[go: up one dir, main page]

Struct sdl2::mixer::Chunk[][src]

pub struct Chunk {
    pub raw: *mut Mix_Chunk,
    pub owned: bool,
}
Expand description

The internal format for an audio chunk.

Fields

raw: *mut Mix_Chunkowned: bool

Implementations

Load file for use as a sample.

Load chunk from a buffer containing raw audio data in the mixer format. The length of the buffer has to fit in 32-bit unsigned integer. The chunk takes ownership of the buffer.

It’s your responsibility to provide the audio data in the right format, as no conversion will take place when using this method.

Set chunk->volume to volume.

current volume for the chunk.

Trait Implementations

Executes the destructor for this type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.