Function ctru_sys::csndPlaySound

source ·
pub unsafe extern "C" fn csndPlaySound(
    chn: c_int,
    flags: u32_,
    sampleRate: u32_,
    vol: f32,
    pan: f32,
    data0: *mut c_void,
    data1: *mut c_void,
    size: u32_
) -> Result
Expand description

Plays a sound.

§Arguments

  • chn - Channel to play the sound on.
  • flags - Flags containing information about the sound.
  • sampleRate - Sample rate of the sound.
  • vol - The volume, ranges from 0.0 to 1.0 included.
  • pan - The pan, ranges from -1.0 to 1.0 included.
  • data0 - First block of sound data.
  • data1 - Second block of sound data. This is the block that will be looped over.
  • size - Size of the sound data.

In this implementation if the loop mode is used, data1 must be in the range [data0 ; data0 + size]. Sound will be played once from data0 to data0 + size and then loop between data1 and data0+size.