[][src]Trait glk::traits::Sound

pub trait Sound {
    fn schannel_create(&mut self, rock: u32) -> schanid_t;
fn schannel_destroy(&mut self, chan: schanid_t);
fn schannel_iterate(&mut self, chan: schanid_t) -> (schanid_t, u32);
fn schannel_get_rock(&mut self, chan: schanid_t) -> u32;
fn schannel_play(&mut self, chan: schanid_t, snd: u32) -> u32;
fn schannel_play_ext(
        &mut self,
        chan: schanid_t,
        snd: u32,
        repeats: u32,
        notify: u32
    ) -> u32;
fn schannel_stop(&mut self, chan: schanid_t);
fn schannel_set_volume(&mut self, chan: schanid_t, vol: u32);
fn sound_load_hint(&mut self, snd: u32, flag: u32); }

GLK_MODULE_SOUND

Required methods

fn schannel_create(&mut self, rock: u32) -> schanid_t

Create a sound channel.

fn schannel_destroy(&mut self, chan: schanid_t)

Destroy a sound channel.

fn schannel_iterate(&mut self, chan: schanid_t) -> (schanid_t, u32)

Iterate over all sound channels. Returns (chan, rock).

fn schannel_get_rock(&mut self, chan: schanid_t) -> u32

Get the stored rock for a sound channel.

fn schannel_play(&mut self, chan: schanid_t, snd: u32) -> u32

Play a sound on a sound channel.

fn schannel_play_ext(
    &mut self,
    chan: schanid_t,
    snd: u32,
    repeats: u32,
    notify: u32
) -> u32

Play a sound on a sound channel, giving number of repeats and whether to notify on

  • completion.

fn schannel_stop(&mut self, chan: schanid_t)

Stop playing sound on a sound channel.

fn schannel_set_volume(&mut self, chan: schanid_t, vol: u32)

Set the current volume for a sound channel.

fn sound_load_hint(&mut self, snd: u32, flag: u32)

Gives the library a hint about whether the given sound should be loaded or not.

Loading content...

Implementors

Loading content...