Questions tagged [avaudioconverter]
11 questions
16
votes
1 answer
Decode AAC to PCM format using AVAudioConverter Swift
How convert AAC to PCM using AVAudioConverter, AVAudioCompressedBuffer and AVAudioPCMBuffer on Swift?
On WWDC 2015, 507 Session was said, that AVAudioConverter can encode and decode PCM buffer, was showed encode example, but wasn't showed examples…

Vladimir Prigarin
- 436
- 5
- 20
10
votes
2 answers
AVAudioConverter with AVAudioConverterInputBlock stutters audio after processing
I'm trying to convert audio buffers to a different format, and I'm using AVAudioConverter. AVAudioConverter does the job when you have the same sample rate and you don't need to use the AVAudioConverterInputBlock.
But if I'm dealing with the same…

MScottWaller
- 3,321
- 2
- 24
- 47
6
votes
1 answer
AVAudioConverter is broken in iOS 10
AVAudioConverter seems broken in iOS 10. The code was working in iOS 9 and now
Error Domain=NSOSStatusErrorDomain Code=-50 "(null)"
is returned no matter what audio format is used. It suprises me every year, that basic library functionality stops…

borrel
- 251
- 5
- 14
3
votes
1 answer
AVAudioConverter convert AVAudioPCMBuffer to AAC
I'm having an issue with AVAudioConverter. I'm trying to convert AVAudioPCMBuffers to AAC.
This is my function for converting, taken from the "What's new in Core Audio" session 507 at WWDC 2015.
func convertPCMBufferToAAC(inBuffer :…

nullforlife
- 1,354
- 2
- 18
- 30
3
votes
1 answer
AVAudioConverter.convertToBuffer throwing error code -50
I need to convert a .wav file recorded with 2 audio channels to a .wav that has only 1 channel, as well as reduce the bit depth from 32 to 16. I've been trying to use AVAudioConverter.convertToBuffer However, the conversion is throwing an error:…

Josh Buhler
- 26,878
- 9
- 29
- 45
2
votes
0 answers
How to resemple pcm data in iOS
I want to use AudioConverterFillComplexBuffer to convert sample rate for a pcm buffer(32k to 44.1k)。But i didn't know why the voice seems changed(too many noise)。Here is the main code:
struct AudioFrame {
int samples; //number of samples in…

Michael
- 21
- 3
1
vote
1 answer
Change audio volume of some channels using AVAudioEngine
I'm working on a mac application that mix audio from a VideoCard and an external audio card.
How can I change volume on each channel (not each source) independently using AVAudioEngine.
Let's say I have an AVAudioPCMBuffer with 16 channels…

vtruant
- 273
- 1
- 12
1
vote
0 answers
How to use AVAudioConverter convertToBuffer:error:withInputFromBlock:
I would like to use AVAudioConverter to convert AVAudioPCMFormatFloat32 non interleaved 44.1 KHz buffer to AVAudioPCMFormatInt16 interleaved 48 KHz.
The incoming AVAudioPCMBuffer have 800 samples and I need to return AVAudioPCMBuffer with 1920…

vtruant
- 273
- 1
- 12
0
votes
1 answer
How to convert PCM to G711 µlaw raw format
I am trying PCM (microphone input)->G711 and am having trouble getting it to work.
With the current implementation, the conversion itself succeeds, but it is as if there is no data stored in the buffer.
I have been doing a lot of research, but I…

zones
- 1
0
votes
1 answer
How does one use AVAudioConverter to convert from mono to stereo?
I'm trying to use AVAudioEngine instead of AVAudioPlayer because I need to do some per-packet processing as the audio is playing, but before I can get that far, I need to convert the 16-bit 8khz mono audio data to stereo so the AVAudioEngine will…

John Michael Zorko
- 329
- 1
- 12
0
votes
1 answer
AVAudioConverter corrupts data
I am trying to convert AVAudioPCMBuffer from Float32 44.1kHz to Int16 8kHz. I use AVAudioConverter. But after the conversion I get corrupted data. When I read data every 100ms from microphone I get every 800th sample broken (first sample in the read…

0awawa0
- 328
- 2
- 5