audioqueue

Popping noise between AudioQueueBuffers

99封情书 提交于 2021-02-10 05:26:11
问题 I'm trying to play a pure sine wave tone using Core Audio AudioQueue's (Swift 3). It plays nicely, but I'm getting popping noises every time my AudioQueueOutputCallback is invoked to fill a new buffer with audio data. My AudioStreamer class looks like: let kNumberBuffers = 3 protocol AudioStreamerDelegate { func requestAudioData() -> [Float] } let sampleRate = 48000.0 let bufferSize = Int(sampleRate) / 50 let bufferByteSize = UInt32(bufferSize * sizeof(Float)) // 20 mili sec of audio class

Popping noise between AudioQueueBuffers

霸气de小男生 提交于 2021-02-10 05:25:51
问题 I'm trying to play a pure sine wave tone using Core Audio AudioQueue's (Swift 3). It plays nicely, but I'm getting popping noises every time my AudioQueueOutputCallback is invoked to fill a new buffer with audio data. My AudioStreamer class looks like: let kNumberBuffers = 3 protocol AudioStreamerDelegate { func requestAudioData() -> [Float] } let sampleRate = 48000.0 let bufferSize = Int(sampleRate) / 50 let bufferByteSize = UInt32(bufferSize * sizeof(Float)) // 20 mili sec of audio class

AVAudioRecorder initWithURL file type documentation

[亡魂溺海] 提交于 2020-01-20 08:43:07
问题 AvAudioRecorder has an init method: - (instancetype)initWithURL:(NSURL *)url settings:(NSDictionary *)settings error:(NSError **)outError And a "magic" behavior is partially documented: URL The file system location to record to. The file type to record to is inferred from the file extension included in this parameter’s value. Is there any further documentation of this feature? Specifically, what are the supported file extensions? And is there any way to support raw output? Related: How to

AudioQueue recording at 8 KHz, not calling Callback every 20 ms

这一生的挚爱 提交于 2020-01-16 08:46:28
问题 iOS 10+ iPhone: 5s & 6 Xcode: 9+ I'm recording audio using aLaw codec at 8 KHz samplerate with sample size 8 bits . I create an AudioQueue like this: // create the queue XThrowIfError(AudioQueueNewInput( &mRecordFormat, MyInputBufferHandler, this /* userData */, NULL /* run loop */, kCFRunLoopCommonModes /* run loop mode */, 0 /* flags */, &mQueue), "AudioQueueNewInput failed"); MyInputBufferHandler is the callback that is called every time a buffer (160 bytes every 20 ms) is filled. So I

audioqueue kAudioQueueParam_Pitch

允我心安 提交于 2020-01-14 14:15:15
问题 The documentation for Audio Queue Services under OS 10.6 now includes a pitch parameter: kAudioQueueParam_Pitch The number of cents to pitch-shift the audio queue’s playback, in the range -2400through 2400 cents (where 1200 cents corresponds to one musical octave.) This parameter is usable only if the time/pitch processor is enabled. Other sections of the same document still say that volume is the only available parameter, and I can't find any reference to the time/pitch processor mentioned

audioqueue kAudioQueueParam_Pitch

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-14 14:15:10
问题 The documentation for Audio Queue Services under OS 10.6 now includes a pitch parameter: kAudioQueueParam_Pitch The number of cents to pitch-shift the audio queue’s playback, in the range -2400through 2400 cents (where 1200 cents corresponds to one musical octave.) This parameter is usable only if the time/pitch processor is enabled. Other sections of the same document still say that volume is the only available parameter, and I can't find any reference to the time/pitch processor mentioned

Stopping and Quickly Replaying an AudioQueue

匆匆过客 提交于 2020-01-13 16:26:50
问题 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

AEC ( Echo Cancellation Support ) in OSX Using AudioQueue

吃可爱长大的小学妹 提交于 2020-01-09 19:32:08
问题 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 回答1: As far as I can find, you have to use Audio Units to access the system's echo

How can I modify the SpeakHere sample app to record in mono format on iPhone?

故事扮演 提交于 2019-12-24 17:15:12
问题 I am new to iPhone. Could you please help me to modify the SpeakHere app from Apple to record in mono format. What should I have to set for mChannelsPerFrame and what else should I set? I already change some part for record on linearPCM WAVE format. Here is link to speakHere. Here is what I think they allow me to change but I don't quite understand on sound: void ChangeNumberChannels(UInt32 nChannels, bool interleaved) // alter an existing format { Assert(IsPCM(), "ChangeNumberChannels only

How to provide audio buffer to AudioQueue to play audio?

笑着哭i 提交于 2019-12-22 17:38:39
问题 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 ? 回答1: 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