The Audio Toolbox framework provides interfaces for recording, playback, and stream parsing. In iOS, the framework provides additional interfaces for managing audio sessions.
Questions tagged [audiotoolbox]
366 questions
2
votes
1 answer
AudioConverterRef with different number of channels
I have an audio format with 4 channels that I want to convert into 2 channels format. kAudioConverterChannelMap can only discard the extra inputs:
When In > Out, the first Out inputs are routed to the first Out outputs, and the remaining inputs are…

Leo
- 3,003
- 5
- 38
- 61
2
votes
1 answer
How to connect multiple AudioUnits in Swift?
I currently have a RemoteIO Audio Unit configured and working, it simply takes input, and passes it to output, so I can hear myself through the headphones of my iPhone when I speak into its microphone.
The next step in what I want to do is add…

Luke
- 9,512
- 15
- 82
- 146
2
votes
1 answer
Using The AudioToolbox Framework
I am new to sound in XCode, I am using sound effects. I want a sound effect and I know that for sound effects you should use audio toolbox framework, what is the code? How do I code it, what are the variables and properties?

user842059
- 73
- 3
- 12
2
votes
0 answers
Midi music pitch shift not working for iOS in Swift
I have a simple app with a keyboard to play music notes. My issue is that I am trying to add a slider to bend the note pitch, but the pitch is not shifting. No errors or anything, the note continues to play without any change in pitch.
I know there…

Fife
- 21
- 3
2
votes
0 answers
VPIO AUAudioUnit's 3A processing not stop at RemoteIO mode on iOS 14 device
I found that in iOS 14+ device, after creating and running an AudioUnit in VPIO mode(with 3A processing), when I recreate my AudioUnit with RemoteIO mode, the 3A processing seems will remain working, which will make my ear loopback feature sounds…

Pandara
- 139
- 7
2
votes
2 answers
AUAudioUnit can't play audio in the background error code 561145187
I'm using AUAudioUnit to play audio that the app is streaming from the server. My code works fine in the foreground. But when I background the app, it won't play the audio. I got the following error.
[aurioc] AURemoteIO.cpp:1590:Start:…

tsoang
- 75
- 1
- 8
2
votes
2 answers
How to schedule MIDI events at "sample accurate" times?
I'm trying to build a sequencer app on iOS. There's a sample on the Apple Developer website that makes an audio unit play a repeating scale, here:
https://developer.apple.com/documentation/audiotoolbox/incorporating_audio_effects_and_instruments
In…

Mike
- 358
- 2
- 7
2
votes
1 answer
Change AudioQueueBuffer's mAudioData
I would need to set the AudioQueueBufferRef's mAudioData. I tried with copyMemory:
inBuffer.pointee.copyMemory(from: lastItemOfArray, byteCount: byteCount) // byteCount is 512
but it doesnt't work.
The AudioQueueNewOutput() queue is properly setted…

szuniverse
- 1,076
- 4
- 17
- 32
2
votes
1 answer
How do I set a certain sequence of audio files programmatically?
I'm looking to play short WAV files (about 1 second each) in certain sequences. The sequences are one measure of 16th notes, segmented into 4 parts, that are generated randomly. An example random sequence would be the following. Each
"x" is a note…

Marcus Kim
- 283
- 2
- 12
2
votes
0 answers
AVAudioConverter Opus
I try to build VoIP application on iOS with echo cancellation. For AEC as I understand I need to use Audio Units. The main problem is how to use AVAudioConverter to encode microphone data to Opus?
opusASBD = AudioStreamBasicDescription(mSampleRate:…

Alex Makushkkin
- 21
- 2
2
votes
0 answers
How to stop playing sound in Xode with AudioToolbox framework?
Possible Duplicate:
Stop a sound using the same button that plays it
Hi, I create a button in my app that play a sound
If I click on this button while the sound is playing it starts again but don't stop the previous one, how can I stop any sound…

pugia
- 442
- 1
- 4
- 11
2
votes
0 answers
AudioToolbox symbol not found when running mame64 on OS X Mojave
Earlier builds of Mame 0.205 run fine, but now when I build Mame 0.211 I get this error message:
./mame64
dyld: Symbol not found: __ZTINSt3__112bad_weak_ptrE
Referenced from: /Users/myself/mame/m06/./mame64
Expected in:…

Randall Bohn
- 2,597
- 2
- 16
- 20
2
votes
0 answers
AKMIDISampler crash on sequencer stop
I'm seeing an intermittent crash in my app when stopping the sequencer. My app uses a custom AudioToolbox-based MusicSequencer, with the AKMIDISampler connected as its midiEndpoint. I've tracked the crash down to AKMIDISampler's func handle(event:…

jbm
- 1,248
- 10
- 22
2
votes
1 answer
How to implement AudioQueue from streamed data
I am trying to set up an audio queue to play streamed audio data. So far this is what I have:
var audioStream = AudioStreamBasicDescription()
audioStream.mSampleRate = 44100
audioStream.mFormatID = kAudioFormatAppleLossless
…

zoecarver
- 5,523
- 2
- 26
- 56
2
votes
1 answer
How to play pcm audio buffer from a socket server using audio unit circular buffer
I hope someone can help me. I am new to Objective-c and OSX and I am trying to play audio data I am receiving via socket into my audio queue. I found out this link https://stackoverflow.com/a/30318859/4274654 which in away address my issue with…

akaiz
- 131
- 11