void AudioPrefetch::msgTick() { PrefetchMsg msg; msg.id = PREFETCH_TICK; while (sendMsg1(&msg, sizeof (msg))) { printf("AudioPrefetch::msgTick(): send failed!\n"); } }
void AudioPrefetch::msgTick(bool isRecTick, bool isPlayTick) { PrefetchMsg msg; msg.id = PREFETCH_TICK; msg.pos = 0; // seems to be unused, was uninitalized. msg._isRecTick = isRecTick; msg._isPlayTick = isPlayTick; while (sendMsg1(&msg, sizeof(msg))) { printf("AudioPrefetch::msgTick(): send failed!\n"); } }
void AudioPrefetch::msgSeek(unsigned samplePos, bool force) { if (samplePos == seekPos && !force) return; ++seekCount; #ifdef AUDIOPREFETCH_DEBUG printf("AudioPrefetch::msgSeek samplePos:%u force:%d seekCount:%d\n", samplePos, force, seekCount); #endif PrefetchMsg msg; msg.id = PREFETCH_SEEK; msg.pos = samplePos; while (sendMsg1(&msg, sizeof(msg))) { printf("AudioPrefetch::msgSeek::sleep(1)\n"); sleep(1); } }