pub fn from_frames(sample_rate: u32, frames: Vec<Frame>, settings: SoundSettings) -> Self {
		let duration = frames.len() as f64 / sample_rate as f64;
		Self {
			id: settings.id.unwrap_or(SoundId::new()),
			sample_rate,
			frames,
			duration,
			default_track: settings.default_track,
			cooldown: settings.cooldown,
			semantic_duration: settings.semantic_duration,
			default_loop_start: settings.default_loop_start,
			groups: settings.groups,
			cooldown_timer: 0.0,
		}
	}
/// Creates a new sound from raw sample data.
Creates a new sound from raw sample data.
Creates a new sound from raw sample data .
pub fn from_frames(sample_rate: u32, frames: Vec<Frame>, settings: SoundSettings) -> Self {
		let duration = frames.len() as f64 / sample_rate as f64;
		Self {
			id: settings.id.unwrap_or(SoundId::new()),
			sample_rate,
			frames,
			duration,
			default_track: settings.default_track,
			cooldown: settings.cooldown,
			semantic_duration: settings.semantic_duration,
			default_loop_start: settings.default_loop_start,
			groups: settings.groups,
			cooldown_timer: 0.0,
		}
	}
pub fn from_frames ( sample_rate : u32 , frames : Vec < Frame > , settings : SoundSettings ) -> Self { let duration = frames . len ( ) as f64 / sample_rate as f64 ; Self { id : settings . id . unwrap_or ( SoundId :: new ( ) ) , sample_rate , frames , duration , default_track : settings . default_track , cooldown : settings . cooldown , semantic_duration : settings . semantic_duration , default_loop_start : settings . default_loop_start , groups : settings . groups , cooldown_timer : 0.0 , } }
Creates a new sound from raw sample data.
Creates a new sound from raw sample data .
sample_rate
u32
frames
Vec<Frame>
settings
SoundSettings
sample_rate
u32
frames
Vec<Frame>
settings
SoundSettings