audioqueueservices

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

Streaming audio from microphone in iPhone using Xamarin

限于喜欢 提交于 2020-01-01 19:21:30
问题 Recording with AudioQueue and Monotouch static sound demonstrates how to get audio via an iPhone's microphone into an AudioQueue using Xamarin.iOS. My question is: how do I keep the microphone continuously recording? I basically want to keep the microphone on for as long as the app is open, and continuously capture the audio stream (note that I do not want to save the stream to file). Inside a long-running while-loop? 回答1: This should work: https://github.com/sami1971/SimplyMobile/blob/master

Streaming audio from microphone in iPhone using Xamarin

允我心安 提交于 2020-01-01 19:21:11
问题 Recording with AudioQueue and Monotouch static sound demonstrates how to get audio via an iPhone's microphone into an AudioQueue using Xamarin.iOS. My question is: how do I keep the microphone continuously recording? I basically want to keep the microphone on for as long as the app is open, and continuously capture the audio stream (note that I do not want to save the stream to file). Inside a long-running while-loop? 回答1: This should work: https://github.com/sami1971/SimplyMobile/blob/master

Playing PCM data using Audio Queues

青春壹個敷衍的年華 提交于 2019-12-24 21:50:27
问题 I have reffered to this to play a PCM file using Audio Queues. The code is as follows: #import "PlayPCM.h" AudioFileID audioFile; SInt64 inStartingPacket = 0; AudioQueueRef audioQueue; @implementation PlayPCM void AudioOutputCallback( void* inUserData, AudioQueueRef outAQ, AudioQueueBufferRef outBuffer) { AudioStreamPacketDescription* packetDescs; UInt32 bytesRead; UInt32 numPackets = 8000; OSStatus status; status = AudioFileReadPackets(audioFile, false, &bytesRead, packetDescs,

AudioQueue callback in simulator but not on device

耗尽温柔 提交于 2019-12-24 11:49:16
问题 I am currently working on an audio processing app on iPhone. it is based on Apple's SpeakHere sample code, aims at real-time audio processing and playback. The code works well in simulator, but not callback when tested on device. The callback function is like this: void AQPlayer::AQBufferCallback(void * inUserData, AudioQueueRef inAQ, AudioQueueBufferRef inCompleteAQBuffer) { AQPlayer *THIS = (AQPlayer *)inUserData; if (THIS->mIsDone) return; UInt32 numBytes; UInt32 nPackets = THIS-

How to lower sound on the iphone's sdk Audioqueue?

梦想与她 提交于 2019-12-22 10:57:59
问题 I'm using Aran Mulhollan' RemoteIOPlayer, using audioqueues in the SDK iphone. I can without problems: - adding two signals to mix sounds - increasing sound volume by multiplying the UInt32 I get from the wav files BUT every other operation gives me warped and distorted sound, and in particular I can't divide the signal. I can't seem to figure out what I'm doing wrong, the actual result of the division seems fine; some aspect of sound / signal processing must obviously be eluding me :) Any

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

怎甘沉沦 提交于 2019-12-22 05:36:20
问题 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

Can not restart an interrupted audio input queue in background mode on iOS

随声附和 提交于 2019-12-22 04:39:16
问题 I'm writing an iOS App using an AudioQueue for recording. I create an input queue configured to get linear PCM, stated this queue and everything works as expected. To manage interruptions, I implemented the delegate methods of AVAudioSession to catch the begin and the end of an interruption. The method endInterruption looks like the following: - (void)endInterruptionWithFlags:(NSUInteger)flags; { if (flags == AVAudioSessionInterruptionFlags_ShouldResume && audioQueue != 0) { NSLog(@"Current

Audio recorded using Audio Queue Services to data

狂风中的少年 提交于 2019-12-18 17:05:09
问题 I want to transmit voice from one iPhone to another. I have established connection between two iPhones using TCP and I have managed to record voice on the iPhone and play it using Audio Queue Services. I have also managed to send data between the two iPhones. I do this by sending NSData packages. My next step is to send the audio data to the other iPhone as it is being recorded. I believe I should do this in the AudioInputCallback . My AudioQueueBufferRef is called inBuffer and it seems that