Questions tagged [audiotoolbox]

The Audio Toolbox framework provides interfaces for recording, playback, and stream parsing. In iOS, the framework provides additional interfaces for managing audio sessions.

Audio Toolbox Framework Reference

366 questions
10
votes
2 answers

Fail Parsing M4A, AAC file with Apple Audio File Stream Services, iOS 7

I'm using this tutorial Multipeer Connectivity Audio Stream To Multiple Peers and this project Github Repository , in order to stream audio from NSInputStream, which is obtained by: -(void)session:didReceiveStream:withName:fromPeer: MCSession…
9
votes
4 answers

Audio Processing: Playing with volume level

I want to read a sound file from application bundle, copy it, play with its maximum volume level(Gain value or peak power, I'm not sure about the technical name of it), and then write it as another file to the bundle again. I did the copying and…
cocoatoucher
  • 1,483
  • 3
  • 17
  • 22
9
votes
1 answer

Encoding PCM (CMSampleBufferRef) to AAC on iOS - How to set frequency and bitrate?

I want to encode PCM (CMSampleBufferRef(s) going live from AVCaptureAudioDataOutputSampleBufferDelegate) into AAC. When the first CMSampleBufferRef arrives, I set both (in/out) AudioStreamBasicDescription(s), "out" according to…
user500
  • 4,519
  • 6
  • 43
  • 56
9
votes
4 answers

Play audio through upper (phone call) speaker

I'm trying to get audio in my app to play through the upper speaker on the iPhone, the one you press to your ear during a phone call. I know it's possible, because I've played a game from the App Store ("The Heist" by "tap tap tap") that simulates…
Nerrolken
  • 1,975
  • 3
  • 24
  • 53
7
votes
2 answers

Write array of floats to a wav audio file in swift

I have this flow now: i record audio with AudioEngine, send it to an audio processing library and get an audio buffer back, then i have a strong will to write it to a wav file but i'm totally confused how to do that in swift. I've tried this snippet…
zo_chu
  • 355
  • 3
  • 14
7
votes
6 answers

How to trigger vibration on Apple Watch OS 2?

I have been working with Apple Watch OS 2 for a while, but have not succeeded in triggering vibration on Apple Watch standalone app in Swift, using Xcode Version 7.0 beta 6 (7A192o). All tutorials using vibration on iPhone in Swift look like: …
Jiri
  • 89
  • 1
  • 1
  • 2
7
votes
2 answers

iOS how to play midi notes?

I have searched and already have done an OS X app that can play MIDI notes, but when i tried in iOS, nothing happened. Here is the core code: AUGraph graph; AudioUnit synthUnit; AUNode synthNode,…
Smeegol
  • 2,014
  • 4
  • 29
  • 44
7
votes
3 answers

AudioServicesPlaySystemSound while AVCaptureSession is active

I'm developing a recording application and I want to play a sound when the recording starts. Unfortunately it appears that since iOS 5 it's not possible to play a system sound when a AVCaptureSession with an audio device is active. Here's the…
Gabriele Petronella
  • 106,943
  • 21
  • 217
  • 235
7
votes
1 answer

How to cancel a playing sound started with AudioServicesPlaySystemSound?

Is there a way to cancel, pause or stop a sound that started playing through a call to AudioServicesPlaySystemSound()?
openfrog
  • 40,201
  • 65
  • 225
  • 373
6
votes
1 answer

Audio Session Services: kAudioSessionProperty_OverrideAudioRoute with different routes for input & output

I'm messing around with Audio Session Services. I'm trying to control the audio routes setting AudioSessionSetProperty: kAudioSessionProperty_OverrideAudioRoute as kAudioSessionOverrideAudioRoute_Speaker. The problem is that it changes the route…
Martha
  • 1,070
  • 1
  • 12
  • 29
6
votes
2 answers

AudioServicesPlaySystemSound not working on iPad device

I'm in the early stages of developing my first iPad application, and for simplicity I have so far been using AudioServicesPlaySystemSound and the associated functions to play sounds. My code is based the SoundEffect class from Apple's Metronome…
Amagrammer
  • 6,385
  • 3
  • 28
  • 30
6
votes
6 answers

AudioServicesPlaySystemSound not playing any sound in iOS 8 device

I have AVFoundation and AudioToolbox frameworks added to my project. In the class from where I want to play a system sound, I #include and I call AudioServicesPlaySystemSound(1007);. I'm testing in a device running iOS…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
6
votes
2 answers

How do you select audio input device in core audio?

I am writing a program that needs to deal with multiple audio inputs. I am currently using AudioQueues to get the input, but this is only from the default input device. Is there any way to either: Select which input device the AudioQueues…
DanielGibbs
  • 9,910
  • 11
  • 76
  • 121
6
votes
1 answer

How to catch __cxa_throw Programmatically in iOS

Some functions in AudioToolBox always throw __cxa_throw, at the same time the function such as ExtAudioFileDispose works well, the return value zero which is normal. When I want to use try {} catch(...) {} block catch this exception, but this…
zhzhy
  • 461
  • 3
  • 17
6
votes
1 answer

OSX CoreAudio mic input mute vs. setting volume to 0.0f

I'm attempting to mute the mic on my Logitech C920 webcam (OSX 10.8.5), but both implementations that I have tried do not work 100%. I would really appreciate it if someone who has experience with Apple's CoreAudio could take a look. Here is what I…
kr4sh
  • 161
  • 2
1
2
3
24 25