sb3_decoder/structs/sound.rs
1//! The sound module contains the [`Sound`] struct and related functionality.
2
3/// The [`Sound`] struct represents a sound in a Scratch 3.0 project.
4///
5/// Fun fact: The spec data in the JSON file is often incorrect but the
6/// wave file itself is fine. Don't trust the spec data from the JSON!
7#[derive(Debug, Clone)]
8pub struct Sound {
9 /// The PCM sample data of the sound.
10 pub data: Vec<i16>,
11
12 /// The sample rate of the sound.
13 pub rate: u32,
14}