FAQ Database Discussion Community


Audio Queue is playing too fast when the buffer size is small

ios,objective-c,buffer,audioqueue,audioqueueservices
I am able to stream and play m4a files using Audio File Services + Audio Queue Services. Bitrate information of the file is not available to the Audio Queue because of file type. After downloading the all of the audio packets I feed them to the player. When I choose...

AudioStreamBasicDescription setting values for wav

ios,wav,audioqueue
I am trying to play a simple PCM file on iOS but couldn't wrap my head around AudioStreamBasicDescription and this link does not provide enough information. I get this values from terminal afinfo BlameItOnTheNight.wav File: BlameItOnTheNight.wav File type ID: WAVE Num Tracks: 1 ---- Data format: 2 ch, 44100 Hz,...

Why does the argument ioNumBytes of AudioFileReadPacketData cause a crash?

ios,core-audio,exc-bad-access,audioqueue
I have got something really strange (at least for me but I am a noob). UInt32 numBytesReadFromFile; OSStatus err = AudioFileReadPacketData( audioFile, // The audio file whose audio packets you want to read. NO, // is cache set? &numBytesReadFromFile, // On output, the number of bytes of audio data that...

Audio Queue Buffer Empty Error

ios,objective-c,buffer,memcpy,audioqueue
I allocate buffers and start audio queue like // allocate the buffers and prime the queue with some data before starting AudioQueueBufferRef buffers[kNumberPlaybackBuffers]; isDone = false; packetPosition = 0; int i; for (i = 0; i < kNumberPlaybackBuffers; ++i) { CheckError(AudioQueueAllocateBuffer(queue, packetBufferSize, &buffers[i]), "AudioQueueAllocateBuffer failed"); // manually invoke callback to...

The sound muted after playing audio with Audio Queue on iOS for a while

ios,audioqueue
I am coding a real time audio playback program on iOS. It receives audio RTP packages from the peer, and put it into audio queue to play. When start playing, the sound is OK. But after 1 or 2 minutes, the sound muted, and there is no error reported from...

Precise time of audio queue playback finish

ios,objective-c,core-audio,audioqueue,audioqueueservices
I am using Audio Queues to playback audio files. I need precise timing on the finish of last buffer. I need to notify a function no later than 150ms-200 ms after the last buffer is played... Thru callback method I know how many buffers are enqueued I know the buffer...

Low latency input/output AudioQueue

ios,swift,audiounit,audioqueue,novocaine
I have two iOS AudioQueues - one input that feeds samples directly to one output. Unfortunately, there is an echo effect that is quite noticeable :( Is it possible to do low latency audio using AudioQueues or do I really need to use AudioUnits? (I have tried the Novocaine framework...