Questions tagged [audiosession]

An audio session is a group of related audio streams.

An audio session contains either rendering streams or capture streams, but not both. By default, the volume and mute settings for a rendering session are persistent across system restarts. The volume and mute settings for a capture session are not persistent. A session that contains streams that operate in loopback mode is treated the same as a capture session.

86 questions
4
votes
2 answers

App with AVPlayer plays mp4 interrupt iPod music after launched

My App plays mp4 using AVPlayer, when my application finish launching, it interrupt the iPod music, although I have set the audio session to allow mix with others in - (BOOL)application:(UIApplication *)application…
nova
  • 781
  • 11
  • 17
4
votes
1 answer

Audio Graph render callback stops being called after audio session interruption

I am using Audio Unit Processing Graph Services on iOS to create a small graph of audio units to output audio. I set a render callback, and feed audio data into the graph when the callback is called. This works fine until my audio session is…
leremjs
  • 973
  • 1
  • 9
  • 25
3
votes
2 answers

How do I handle other audio playing, in light of multitasking, in iOS?

In the Audio Session Cookbook there is a section on "Checking if Other Audio is Playing During App Launch". I'm using MonoTouch (but feel free to give an Objective-C answer, the API is the same), so the code from that document looks something like…
Andrew Russell
  • 26,924
  • 7
  • 58
  • 104
3
votes
1 answer

How do you use AVAudioPlayer to play music while in the background?

I currently use AVAudioPlayer to play music while in the foreground, but when I press the home button my application goes to the background and the music stops. I set the category for my AVAudioSession to AVAudioSessionCategoryPlayback and set…
2
votes
2 answers

Detecting when Bluetooth is disabled on iOS5

I'm developing blog speaker app. I wanna pause the audio when bluetooth is disabled like iPod app. I thought it's not possible without using private api after reading this. Check if Bluetooth is Enabled? But, my customer told me that Rhapsody and…
Umeumeume
  • 1,952
  • 3
  • 21
  • 40
2
votes
1 answer

MPMoviePlayerController is not responding to device volume controls

I'm working on a game that during the title sequence plays a video in the background using MPMoviePlayerController. I overlay my game controls over this (just a few textured UIButtons). The video itself has no audio, but I'm playing sounds when I…
Rich Brooks
  • 521
  • 1
  • 6
  • 17
2
votes
1 answer

AVAudioPlayer, using AmbientSound session, is not playing when app is in background

If this is in the apple doc then I've not been able to find it - hoping someone can help: My app plays occasional short audio clips - I want the audio to mix in with audio playing from other apps in the background like the iPod app - but I also want…
Simon East
  • 2,516
  • 2
  • 18
  • 21
2
votes
1 answer

AudioSession input from bluetooth output to line out or speaker

Once an audio session has been set up the following code allows bluetooth input. UInt32 allowBluetoothInput = 1; AudioSessionSetProperty (kAudioSessionProperty_OverrideCategoryEnableBluetoothInput, sizeof (allowBluetoothInput),…
Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228
2
votes
0 answers

iOS / AudioSessions: Route audio IN through the INTERNAL MIC when EXTERNAL headset mic is present?

As it says on the can really: Can I route audio IN through the INTERNAL MIC when an EXTERNAL headset mic is present? If so, how? EDIT: I found…
P i
  • 29,020
  • 36
  • 159
  • 267
2
votes
0 answers

Is it possible to force an AVAudioSession to output to the headphone jack even if an HDMI accessory is connected?

Is it possible to force audio through the headphone jack even if an HDMI adatper is connected? I see that iOS 5.0 now has constants for multiple Audio Routes: const CFStringRef kAudioSessionOutputRoute_LineOut; const CFStringRef…
kcharwood
  • 2,501
  • 19
  • 22
2
votes
1 answer

iphone app: how to deactivate and activate ipod app

my voip app is configured to kAudioSessionCategory_PlayAndRecord category and kAudioSessionProperty_OverrideCategoryMixWithOthers audio session property. During voip call, when voice playback and record is happening, ipod music is also mixing with…
2
votes
0 answers

Audio stop when phone sleep

in my Flutter app I can play a list of radio stations, but if while the audio is playing, I put the app in the background and lock the screen, sometimes immediately or after 30 seconds, the audio is interrupted and the control center is set with a…
2
votes
1 answer

How to programmatically change the volume on call using the Sinch SDK?

At the moment, when I call and try to change the volume with UI elements, I only see the UI change, the volume slider change, but not the device volume. The volume is static. For volume changing I'm using MPVolumeView static func…
2
votes
0 answers

Get currently active AudioSessions or AudioOutput

I'm trying to create a Visualizer with the Visualizer Class. The documentation says to use "0" as session id to get the audio output, however this seems to be deprecated and only results in an error. I searched for ways to get the currently active…
2
votes
1 answer

iOS core Audio Lifecycle - AVAudioIONodeImpl.mm:365 -required condition is false: hwFormat

I'm developing an iOS application, it is composed by 2 main module: an audio analysis module base on Core Audio, and an output module that uses AudioKit. This is audio input class: import AVFoundation typealias AudioInputCallback = ( _…
Nadir Bertolasi
  • 527
  • 6
  • 17