AudioPlayer

class AudioPlayer

Audio player that plays sound

  • A class that plays buffers or segments of audio files

    Declaration

    Swift

    let node: AVAudioPlayerNode
  • Audio player state

    Declaration

    Swift

    var state: State
  • Plays AVAudioFile for sound identifier

    Declaration

    Swift

    func play(_ file: AVAudioFile, identifier: SoundIdentifier)

    Parameters

    file

    Audio file that will be played

    identifier

    Sound identifier which is will start to play

  • Called when Audio player completed playback

    Declaration

    Swift

    func didCompletePlayback(for sound: SoundIdentifier)

    Parameters

    sound

    Sound identifier which is completed

  • Audio player’s status type

    See more

    Declaration

    Swift

    enum Status
  • Audio player’s state type

    See more

    Declaration

    Swift

    struct State