FAQ Database Discussion Community


Stream radio from url with AVPlayer -> iPhone player controls not working

ios,avplayer,avaudiosession
I use AVPlayer to stream a live sound from a url. It works perfectly except when my app is in background and I want to play or pause the iPhone player in the swipe-up menu (I dont know its exact name). The volume controls work, but not the play/pause controls....

session.setPreferredInput in Swift?

ios,swift,input,avaudiosession,nserror
I am trying to set the preferred input to my AVAudioEngine. I have the following code: var iphoneInput: AVAudioSessionPortDescription = AVAudioSession.sharedInstance().availableInputs[0] as! AVAudioSessionPortDescription var error: NSError? session.setPreferredInput(inPort: iphoneInput, error: error) but Xcode keeps giving me errors for the last line stating taht it cannot invoke setPreferredinput with an arguement list...

Core Audio: Audio Unit to boost signal level

ios,audio,boost,core-audio,avaudiosession
Our VOIP app uses both the Voice Processing IO Unit and the Remote IO Unit (we rebuild the AUGraph depending on which IO unit we require). We've noted that the audio output level is not as loud as some other VOIP apps such as Skype. Rather than manipulating the incoming...

How to change an iOS device volume programmatically?

ios,objective-c,avaudiosession
Is there a way to change the device volume programmatically? maybe using audio session?

Does Media Player Framework need audio sessions to be managed?

ios,media-player,core-audio,avaudiosession,mpmusicplayercontroller
I'd like to include a simple media player in my iOS 7+ app, and I've found some posts dealing with Media Player Framework and the MPMusicPlayerController, and I think that can meet my needs. However, I couldn't find the related documentation in Apple's docs, and instead I found that there...

Monitor current dB level in Objective-C

objective-c,microphone,avaudiorecorder,avaudiosession
I'm trying to display the decibel level of incoming sound via the iPhone microphone, everything works in the simulator, but does not work on an actual iOS device. It's like the iPhone is not detecting sound, here is my code: - (void)viewDidLoad { [[AVAudioSession sharedInstance] requestRecordPermission:^(BOOL granted) { if (granted)...

AVPlayer (or AVAudioSession?) plays after I leave the ViewController, and when I return two are then playing

ios,objective-c,audio,avplayer,avaudiosession
I have a viewController that streams audio from the web. When I leave that page of my app, the audio keeps playing (this is good). However, when I go back, the viewdidload method creates a second audioplayer. I can do this over and over until I have so many AVplayers....

AVAudioSession properties after Initializing AUGraph

ios,core-audio,avaudiosession
To start a call, our VOIP app sets up an AVAudioSession, then builds, initializes and runs an AUGraph. During the call, we allow the user to switch back and forth between a speakerphone mode using code such as: avSession = [AVAudioSession sharedInstance]; AVAudioSessionCategoryOptions categoryOptions = [avSession categoryOptions]; categoryOptions |= AVAudioSessionCategoryOptionDefaultToSpeaker;...