FreeStreamer icon indicating copy to clipboard operation
FreeStreamer copied to clipboard

Stop and then start playing an AVAudioPlayer from local file

Open matiasf9 opened this issue 9 years ago • 7 comments

When I stop a FSAudioStream with a stream url loaded ( [self.streamer stop] ) and then start immediately an AVAudioPlayer with a local file ( self.audioPlayer = [[AVAudioPlayer alloc] initWithData:soundData error:&error], [self.audioPlayer play]; ), the audioPlayer´s sound is stopped and the device throw me a warning ([0x384aa9dc] AVAudioSession.mm:646: -[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.)

This does not happen in the simulators, only in devices. In simulator, the code works perfect.

matiasf9 avatar Mar 23 '15 21:03 matiasf9