AudioPlayerManager

class AudioPlayerManager

Audio Player Manager, used to control the sound playing process

  • Initializes the Audio Playe Manager

    Declaration

    Swift

    public init()

Loading Sounds

  • Loads sound with Audio file

    Declaration

    Swift

    func load(audioFile: AudioFile)

    Parameters

    audioFile

    Audio file

  • Loads sound with URL for sound’ identifier

    Declaration

    Swift

    func load(sound url: URL, for identifier: SoundIdentifier)

    Parameters

    url

    File’s URL

    identifier

    Sound’s identifier

Playback

  • Plays sound with an identifier

    Declaration

    Swift

    func play(_ sound: SoundIdentifier, allowOverlap: Bool = true)

    Parameters

    sound

    Sound’s identifier

    allowOverlap

    Allow overlap sound each other