pub struct Sound {
    pub compression: Compression,
    pub volume: f64,
    pub preload: bool,
    pub bit_rate: BitRate,
    pub sample_rate: SampleRate,
    pub output: Output,
    pub bit_depth: BitDepth,
    pub audio_group_id: AudioGroupId,
    pub sound_file: String,
    pub duration: f64,
    pub resource_data: ResourceData,
    pub resource_type: ConstGmSound,
}

Fields

compression: Compression

The type of compression for the file.

volume: f64

The volume of the file.

preload: bool

Whether the sound is “preloaded” or not. I don’t know what this actually does.

bit_rate: BitRate

The bitrate of the audio. Higher is better I think? Honestly lol, knowing what “bitrate” means is for fuckin nerds This is in “kbps” apparently, so probably kilobits (bytes?) per second. Look, no one knows.

sample_rate: SampleRate

SAMPLE RATE?? I didn’t know BITRATE you think i’m gonna know “SAMPLE RATE” it’s the rate of the samples go fuck yourself

output: Output

The kind of the sound for mono/stereo.

bit_depth: BitDepth

The quality of the sound.

audio_group_id: AudioGroupId

This is the Path to the Audio Group Id.

sound_file: String

This is a path to the Audio file, which will be the same name as the sound file generally. If there is no sound set up for this asset, then this field will be an empty string.

duration: f64

The duration of the sound in seconds, such as 12.4 for 12 seconds and 400 miliseconds.

resource_data: ResourceData

Common resource data.

resource_type: ConstGmSound

The resource type, always the same for sounds.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.