Struct nitro::audio::Audio [] [src]

pub struct Audio {
    pub playlist: Playlist,
    // some fields omitted
}

Responsible for controlling audio playback in the game.

This structure makes 128 sound channels available to the user of this library. When member methods request a channel id that id must be between 0 and 127.

Fields

Methods

impl Audio
[src]

[src]

Plays a sound at a volume between 1.0 and 0.0

path is a filename relative to assets/sounds (assets\sounds on Windows)

[src]

Play a sound on a user sound channel.

[src]

Set the volume for a user sound channel. Volume is between 0.0 and 1.0

[src]

Get the volume for a user sound channel. Volume is between 0.0 and 1.0

[src]

Pause audio output on a user sound channel.

[src]

Resume paused audio output on a user sound channel.

[src]

Returns true if a channel is not playing anything. This will still return false if the channel has a sound to play but is paused.