audioqueue

AudioQueue in-memory playback example

南笙酒味 提交于 2019-12-03 08:27:38
Does anybody know of any examples using AudioQueue that play from an in-memory source? All the examples I can find play from files (using AudioFileReadPackets) but in my particular case I am generating the data myself in realtime so ideally, I want to enqueue the data myself rather than sucking it out of a file using the callback. Any help much appreciated. i know of an example using audio units that you could adapt, as the callbacks are very similiar, try here rcw3 The Audio Queue Services Programming Guide should give you the details you need but obviously is a bit lax on the specific

AudioQueue callback get empty buffer on iOS 7 only

纵然是瞬间 提交于 2019-12-03 00:51:30
I got a strange issue. My code works great on both iOS 5&6 but when running on iOS 7 I get empty buffers on the AudioQueue callback. Possible relevant code: - (void)setUpAudioFormat { audioFormat.mFormatID = kAudioFormatLinearPCM; audioFormat.mSampleRate = SAMPLE_RATE;//16000.0; audioFormat.mChannelsPerFrame = CHANNELS;//1; audioFormat.mBitsPerChannel = 16; audioFormat.mFramesPerPacket = 1; audioFormat.mBytesPerFrame = audioFormat.mChannelsPerFrame * sizeof(SInt16); audioFormat.mBytesPerPacket = audioFormat.mBytesPerFrame * audioFormat.mFramesPerPacket; audioFormat.mFormatFlags =

Recording with AudioQueue and Monotouch static sound

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 19:53:18
I have written a small program in MonoTouch to record sound from the mic of my iPhone 4s using an InputAudioQueue. I save the recorded data in an array and feed this buffer to the my audio player for playback (using OutputAudioQueue). When playing back it's just some stuttering garbage / static sound. I have tried filling the buffer with sin waves before playback and then it sounds good, so I guess the problem is in the recording, not the playback. Can anyone help me see what is wrong? (Code below) public class AQRecorder { private const int CountAudioBuffers = 3; private const int

AudioQueue does not output any sound

a 夏天 提交于 2019-12-01 14:20:27
I have trouble getting sound output on my iPhone experiment and I'm out of ideas. Here is my callback to fill the Audio Queue buffer void AudioOutputCallback(void *user, AudioQueueRef refQueue, AudioQueueBufferRef inBuffer) { NSLog(@"callback called"); inBuffer->mAudioDataByteSize = 1024; gme_play((Music_Emu*)user, 1024, (short *)inBuffer->mAudioData); AudioQueueEnqueueBuffer(refQueue, inBuffer, 0, NULL); } I setup the audio queue using the following snippet // Create stream description AudioStreamBasicDescription streamDescription; streamDescription.mSampleRate = 44100; streamDescription

AudioQueue does not output any sound

ぃ、小莉子 提交于 2019-12-01 12:29:36
问题 I have trouble getting sound output on my iPhone experiment and I'm out of ideas. Here is my callback to fill the Audio Queue buffer void AudioOutputCallback(void *user, AudioQueueRef refQueue, AudioQueueBufferRef inBuffer) { NSLog(@"callback called"); inBuffer->mAudioDataByteSize = 1024; gme_play((Music_Emu*)user, 1024, (short *)inBuffer->mAudioData); AudioQueueEnqueueBuffer(refQueue, inBuffer, 0, NULL); } I setup the audio queue using the following snippet // Create stream description

Realtime AudioQueue Record-Playback

大城市里の小女人 提交于 2019-11-30 16:25:07
Hey fellows, Iam trying to build an application for realtime voicechanging. In a first step I managed to record audiodata to a specified file and to play it after recording. Now I try to change the code for playing back the audiobuffers right after recording them in loop. My question is, how it is possible to read the Audiodata directly from the recording Audioqueue and not (like shown in documentation) from a file. Iam thankful for any ideas and could show code-parts if needed. Thanks in advance, Lukas (from Germany) Have a look at the SpeakHere example. This line sources the audio data:

Realtime AudioQueue Record-Playback

怎甘沉沦 提交于 2019-11-30 16:14:20
问题 Hey fellows, Iam trying to build an application for realtime voicechanging. In a first step I managed to record audiodata to a specified file and to play it after recording. Now I try to change the code for playing back the audiobuffers right after recording them in loop. My question is, how it is possible to read the Audiodata directly from the recording Audioqueue and not (like shown in documentation) from a file. Iam thankful for any ideas and could show code-parts if needed. Thanks in

iOS: Pulsing red double-height status bar

一个人想着一个人 提交于 2019-11-29 18:03:24
I am developing a recording app, and I'd like to show a pulsing red double-height status bar on top of my app while the app is recording, and while the user is still in the app - just like Voice Memos. How do I do that? I can get it so that the double-height red status bar appears when I am outside the app, but not while inside the app. Any hints? Is it actually possible at all? to answer the last question first: it is possible, though i don't know whether the mechanism for causing to happen in other apps can be applied to your own. to answer your next to questions "how do i do that? any hints

AudioQueue how to find out playback length of queued data

戏子无情 提交于 2019-11-29 12:50:42
I am using AudioQueue to stream some song, my question is how can i tell the length of playback of already queued buffers? I want to stream two seconds of data at a time, the problem i am having is how do i know how many bytes actually correspond to two seconds of music (so i can always be ahead by two seconds). Thanks Daniel Here is a class that uses Audio File Services to get at bitrate / packet / frame data to grab the amount of bytes from a music file that correspond to x seconds, the example has been tested with mp3 and m4a files Header #import <Foundation/Foundation.h> #import

AEC ( Echo Cancellation Support ) in OSX Using AudioQueue

半城伤御伤魂 提交于 2019-11-28 23:55:22
I am developing VOIP Application on OSX and iOS and will be using AudioQueue for Audio flow, what want to Know is, by default does AudioQueue support acoustic echo cancellation or do we need to add support for it, If we need to implement, i believe some open source library has to be implemented like Speex are there any Example available shows integration of AudioQueue with Speex or any other library As far as I can find, you have to use Audio Units to access the system's echo cancellation. You do that by using kAudioUnitSubType_VoiceProcessingIO instead of kAudioUnitSubType_RemoteIO . You