audiosession

Get Audio Session Id from Google Meet

淺唱寂寞╮ 提交于 2020-12-23 13:50:20
问题 I am playing with DynamicsProcessing. I want to process the audio from an external application. I just require the audioSessionId for that. I have no problems with Play Music , for example. I have used a BroadCastReceiver listening the android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION and everything works like a charm. <receiver android:name=".framework.AudioSessionReceiver"> <intent-filter> <action android:name="android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION"/> </intent-filter>

Get Audio Session Id from Google Meet

穿精又带淫゛_ 提交于 2020-12-23 13:48:36
问题 I am playing with DynamicsProcessing. I want to process the audio from an external application. I just require the audioSessionId for that. I have no problems with Play Music , for example. I have used a BroadCastReceiver listening the android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION and everything works like a charm. <receiver android:name=".framework.AudioSessionReceiver"> <intent-filter> <action android:name="android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION"/> </intent-filter>

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

倾然丶 夕夏残阳落幕 提交于 2020-01-24 09:40:26
问题 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 active to YES. Additionally, I added the audio key to UIBackgroundModes in my Info.plist. Is there anything else I need to do to enable background music playback? 回答1: There's apparently a bug in the simulator - it doesn't work there, while it works

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

一曲冷凌霜 提交于 2020-01-24 09:40:09
问题 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 active to YES. Additionally, I added the audio key to UIBackgroundModes in my Info.plist. Is there anything else I need to do to enable background music playback? 回答1: There's apparently a bug in the simulator - it doesn't work there, while it works

App with AVPlayer plays mp4 interrupt iPod music after launched

删除回忆录丶 提交于 2020-01-11 06:13:49
问题 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 didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { AudioSessionInitialize(NULL, NULL, NULL, NULL); AudioSessionSetActive(true); UInt32 sessionCategory = kAudioSessionCategory_AmbientSound; AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof

Detect (listen to) audio route change in iOS 7

牧云@^-^@ 提交于 2019-12-18 18:51:07
问题 Just starting development for iOS 7, and found that AudioSession related functions and PropertyListeners are deprecated in iOS 7. Before I use the following method to detect if a headset has been plugged in or unplugged from the device: /* add callback for device route change */ AudioSessionAddPropertyListener ( kAudioSessionProperty_AudioRouteChange, audioRouteChangeListenerCallback, (__bridge void *)(self)); Then implement the listener callback to do different things to the internal

Using a bluetooth sound device in iOS7 without microphone permissions

不想你离开。 提交于 2019-12-11 02:08:51
问题 With the iOS7 the AudioSession Category AVAudioSessionCategoryPlayAndRecord asks for Microphone permission. However, that permission doesn't feel right if I only need to support bluetooth for external audio. There are some people that are in the same situation as I am right now, but I can't find an answer for this. In iOS6 I was using this code to route the sound to bluetooth devices: [[AVAudioSession sharedInstance] setDelegate:self]; [[AVAudioSession sharedInstance] setCategory

PlaySystemSound with mute switch on

倾然丶 夕夏残阳落幕 提交于 2019-12-04 11:09:48
问题 I know, I have to set the AudioSession to the 'playback' category, which allows audio even when the mute switch is on. This is what I do, but sound still gets muted when switch is on. UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; AudioSessionSetProperty(kAudioSessionProperty_AudioCategory,sizeof(sessionCategory), &sessionCategory); SystemSoundID soundID; NSString *path = [[NSBundle mainBundle] pathForResource:soundString ofType:@"wav"]; AudioServicesCreateSystemSoundID(

Routing iPhone Audio Sound

拥有回忆 提交于 2019-12-03 10:08:39
问题 I have an app which does listen and play sound at the same time. By default, the sound output goes through the earphone. So I use the following code to route it through the speaker: UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute, sizeof(audioRouteOverride), &audioRouteOverride); This works fine. But now, I'd like to route the sound through the headphones when headphones or external speakers are attached.

Routing iPhone Audio Sound

放肆的年华 提交于 2019-12-03 00:39:22
I have an app which does listen and play sound at the same time. By default, the sound output goes through the earphone. So I use the following code to route it through the speaker: UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute, sizeof(audioRouteOverride), &audioRouteOverride); This works fine. But now, I'd like to route the sound through the headphones when headphones or external speakers are attached. How would I achieve that? Also ideally all other sound (i.e. music etc.) should mute when the app