audioqueue

how to use AQRecorder from speakhere example

安稳与你 提交于 2019-12-11 02:22:16
问题 I have coppied over AQRecorder from the speakHere example along with all the other needed files. After doing so I renamed any classes in the chain that uses it to .mm due to compilation errors, which seem to be resolved now. However I still cannot figure out how to use the AQRecorder class. There is another class in that example called SpeakHereController but that didnt work either. Here is the code for my latest attempt: #import "AQRecorder.h" AQRecorder recorder; [recorder startRecord];

Play raw uncompressed sound with AudioQueue, no sound

冷暖自知 提交于 2019-12-11 01:08:51
问题 I use three buffers with one queue, to play ADPCM data over network. The data is decoded from my app, and the decoded data (uncompressed pcm data) is verified correctly by playing from Audacity. However, I cannot hear any sound when playing from my app using AudioQueue. All AudioQueue API return values are noErr (0). I've been trying to follow AudioQueue does not output any sound by allocating three buffers . It didn't work for me! Somebody knows how to reveal more AudioQueue logs so I could

Low latency input/output AudioQueue

旧街凉风 提交于 2019-12-09 07:13:14
问题 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 that uses AudioUnits and here the latency is much smaller. I've also noticed this framework seems to use less CPU resources. Unfortunately, I was unable to use this framework in my Swift project without major

Audio Queue : AudioQueueStart returns -50

戏子无情 提交于 2019-12-07 09:48:45
问题 I'm trying to write a microphone power meter module in a GLES app (Unity3d). It works fine in UIKit application. But when I integrate into my unity3d project, the AudioQueue cannot start property.The result code of calling AudioQueueStart is always -50, but what does -50 mean? I can't find a reference in iOS Developer Library. I have searched about this problem and know someone has the same problem in a cocos2d application. Maybe this has some relevance. Here is my code for Start Audio Queue:

How to provide audio buffer to AudioQueue to play audio?

一曲冷凌霜 提交于 2019-12-06 10:56:27
In my application, I am receiving audio data in LinearPCM format, which I need to play. I am following iOS SpeakHere example. However I cannot get how and where I should provide a buffer to AudioQueue . Can anyone provide me a working example of playing audio buffer in iOS via AudioQueue ? In the SpeakHere example playback is achieved using AudioQueue . In the set up of AudioQueue , a function is specified that will be called when the queue wants more data. You can see that in this method: void AQPlayer::SetupNewQueue() Here's the line that specifies the callback function: XThrowIfError

Stopping and Quickly Replaying an AudioQueue

ⅰ亾dé卋堺 提交于 2019-12-05 21:06:37
I've got an audio queue that I've got playing, stopping, pausing correctly but I'm finding the AudioQueueStop() function to be taking a long time to execute. I'd like to immediately stop and then restart playing an audio queue and was wondering what the quickest way to do so would be. In my project I have multiple audio queues that I keep around to play specific sounds over and over. There is a situation where I must stop some of those sounds and then immediately play them and many more at once. It isn't so bad if there are only a couple of audio queues that I do this to but it starts taking a

Audio Queue : AudioQueueStart returns -50

寵の児 提交于 2019-12-05 17:16:25
I'm trying to write a microphone power meter module in a GLES app (Unity3d). It works fine in UIKit application. But when I integrate into my unity3d project, the AudioQueue cannot start property.The result code of calling AudioQueueStart is always -50, but what does -50 mean? I can't find a reference in iOS Developer Library. I have searched about this problem and know someone has the same problem in a cocos2d application. Maybe this has some relevance. Here is my code for Start Audio Queue: UInt32 ioDataSize = sizeof(sampleRate); AudioSessionGetProperty(kAudioSessionProperty

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

僤鯓⒐⒋嵵緔 提交于 2019-12-05 09:10:40
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 a buffer size around 32768 or 16384 since callbacks are called less often and and each buffer size is big, it seems it is playing almost at regular speed. Problem is sometimes I have to play small files as well but when I choose a small buffer size -512 or 1024 or 2048 up to 8192- audio plays really fast and with occasional

AudioQueue in-memory playback example

你离开我真会死。 提交于 2019-12-04 13:37:14
问题 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. 回答1: i know of an example using audio units that you could adapt, as the callbacks are very similiar, try here 回答2: The Audio Queue

AudioQueue callback get empty buffer on iOS 7 only

被刻印的时光 ゝ 提交于 2019-12-03 10:20:42
问题 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