pub struct AudioEngine {
pub volume: f32,
pub buffer: Vec<i16>,
pub module_name: String,
}Fields§
§volume: f32§buffer: Vec<i16>§module_name: StringImplementations§
Source§impl AudioEngine
impl AudioEngine
pub fn new(module_name: String) -> Self
pub fn get_buffer(&self) -> &[i16]
pub fn get_normalized_buffer(&self) -> Vec<f32>
pub fn mix(&mut self, other: &AudioEngine)
pub fn merge_with(&mut self, other: AudioEngine)
pub fn set_duration(&mut self, duration_secs: f32)
pub fn generate_wav_file(&mut self, output_dir: &String) -> Result<(), String>
pub fn insert_note( &mut self, waveform: String, freq: f32, amp: f32, start_time_ms: f32, duration_ms: f32, synth_params: HashMap<String, Value>, note_params: HashMap<String, Value>, automation: Option<HashMap<String, Value>>, )
pub fn insert_sample( &mut self, filepath: &str, time_secs: f32, dur_sec: f32, effects: Option<HashMap<String, Value>>, variable_table: &VariableTable, )
Trait Implementations§
Source§impl Clone for AudioEngine
impl Clone for AudioEngine
Source§fn clone(&self) -> AudioEngine
fn clone(&self) -> AudioEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioEngine
impl Debug for AudioEngine
Source§impl PartialEq for AudioEngine
impl PartialEq for AudioEngine
impl StructuralPartialEq for AudioEngine
Auto Trait Implementations§
impl Freeze for AudioEngine
impl RefUnwindSafe for AudioEngine
impl Send for AudioEngine
impl Sync for AudioEngine
impl Unpin for AudioEngine
impl UnwindSafe for AudioEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more