AEAudioFilePlayer doesn't stop

I am currently playing some audio file using AEAudioFilePlayer.

I would like to put a stop button so user can stop. The class doesn't have a stop method.

How can I achieve a stop and pause facility?

Comments

  • Is it safe to just abruptly remove it from the AudioController array of channels to stop the playback?
    This won't facilitate pausing though would it?

  • Hello - you can set channelIsPlaying to NO to achieve that. To resume, set it to YES again, or set the playhead to zero to begin playing from the start again.

  • I don't seem to find channelsPlaying.

    Are you suggesting I create a channel group and then use setPlaying:forChannelGroup?

    Currently I am playing the track by just adding AEAudioFilePlayer

    let array: [AEAudioFilePlayer] = [player]
    audioController.addChannels(array)

  • Thanks - There should be a close issue button in this forum.

    channelIsPlaying does exist

Sign In or Register to comment.