sb3-decoder 0.1.0

A Rust library for decoding Scratch 3.0 project files (.sb3)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! The sound module contains the [`Sound`] struct and related functionality.

/// The [`Sound`] struct represents a sound in a Scratch 3.0 project.
///
/// Fun fact: The spec data in the JSON file is often incorrect but the
/// wave file itself is fine. Don't trust the spec data from the JSON!
#[derive(Debug, Clone)]
pub struct Sound {
    /// The PCM sample data of the sound.
    pub data: Vec<i16>,

    /// The sample rate of the sound.
    pub rate: u32,
}