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.

80 questions
1
vote
1 answer

Switch audio output to speaker and mic?

I am facing problem while switch audio with speaker and mic. First when app app launch audio play to the default speaker. then on button event I change to the mic its playing in mic. But when I try to switch back to the speaker its not working for…
Sunny Shah
  • 12,687
  • 8
  • 45
  • 79
1
vote
0 answers

AVAudioSessionMediaServicesWereResetNotification equivalent in iOS 5?

The AVAudioSessionMediaServicesWereResetNotification was introduced in iOS 6. I need the same event in previous iOS versions. I searched the Apple documentation without any luck. In iOS 5 I tried listening with AudioSessionAddPropertyListener for…
Butaca
  • 396
  • 2
  • 14
1
vote
1 answer

AudioSessionAddPropertyListener call-back function called for no reason

In order to keep an eye, on an earphone possibly plugged or unplugged, in my iPhone app and react properly; I use the following kind of code, in a few of my classes: - (void)viewDidLoad { [super viewDidLoad]; ….. …
Michel
  • 8,287
  • 14
  • 60
  • 126
1
vote
1 answer

AudioSessionSetActive(false) always fails

I just found that my AudioSessionSetActive(false) call in my "shutdown" code never returns noErr. There are some undocumented code like (OSStatus) 803204036, which corresponds to none of the listed return…
kakyo
  • 7,592
  • 9
  • 54
  • 95
1
vote
1 answer

how to stop audio when iOS Sleep Timer gets called

I want to stop my audio app when iOS sleep timer gets called. Just like Pandora app. http://help.pandora.com/customer/portal/articles/24324-ios-sleep-timer-with-pandora Tap the Clock app, Tap Timer, Select a time, Tap When Timer Ends, Tap Stop …
Non Umemoto
  • 1,924
  • 3
  • 18
  • 37
1
vote
1 answer

iOS audio output only to headphone jack

Is it possible to output audio only to the iOS device's headphone jack and nowhere else? (e.g. not speakers nor bluetooth) We're experimenting on a hardware add-on that receives input as tones from the audio jack. We could try detecting whether the…
adib
  • 7,718
  • 6
  • 46
  • 85
1
vote
0 answers

How to mix sounds from different audio units in iOS?

I have an application which has VoIP and at the same time it renders customs sounds. The VoIP audio unit is set as follows: au_description.componentType = kAudioUnitType_Output; au_description.componentSubType =…
OtoLeo
  • 343
  • 2
  • 19
1
vote
0 answers

Is it possible to 'duck' an AudioSession whilst using OpenAL?

Does anybody know if this is possible? I have my audio session and OpenAL set-up like so: // Allow their music to play in the background AudioSessionInitialize(NULL, NULL, openALInterruptionListener, (__bridge void *)(self)); UInt32 sessionCategory…
Tricky
  • 6,363
  • 5
  • 30
  • 37
1
vote
1 answer

How to change or disable AudioSessionInterruptionListener

I need a way to change or disable the AudioSessionInterruptionListener after the AudioSession has been initialized. Here's why: In some use cases my app must run in the background with audio recording, so the audio background mode is set - this…
Adam Jones
  • 775
  • 6
  • 21
1
vote
2 answers

More then one audio session per single application instance

Does WASAPI or Media Foundation allow creating several audio sessions for single process?
Alexandr
  • 11
  • 1
  • 1
1
vote
1 answer

Audio Session Interruption Listener not called

AudioSessionCategory is set to PlayAndRecord. I have an interruption listener and in the first line of it: printf("hello\n"); My app can record wav, caf and mp4. When my app is recording in wav format and an interruption arrives I can see "hello"…
Ocelot
  • 1,683
  • 2
  • 16
  • 31
1
vote
1 answer

iPhone restore AudioSession in Play&Record after playing youtube video

I have a problem about managing AudioSession (set as Play&Record category) interruptions in my VoIP app in iOS 5.x. When I have a call in progress, going background and starting youtube app, the audio session begin-interruption occurs and I can put…
1
vote
1 answer

iOS gamekit, card game players, & GKVoiceChatService

I'm working on a card game for iOS. I'm thinking game center integration is something I want to be leaning towards, but in terms of a card game, I'm not exactly sure what that would entail for the individual players. From the Apple class reference,…
Slayer0248
  • 1,133
  • 3
  • 14
  • 25
1
vote
2 answers

headphone plug-in plug-out event when audio route doesn't change - iOS

I'm working on iPad. I would like to detect when user plug-out headphone. First I used a listener on the property kAudioSessionProperty_AudioRouteChange. So all was working well until I've decided to add a button to switch to speakers when headphone…
Cyril
  • 31
  • 1
  • 6
0
votes
1 answer

How do I call mpmovieplayer from applicationwillresignactive in ppdelegate?

I'm using mpmovieplayer to play an audio stream. I'm having trouble with handling intruptions e.g when a call is received. My player is declared in viewcontroller and I beleive I need to do something in applicationdidresignactive in my appdelegate…
ss30
  • 1
  • 2