use crate::FileLoader;
use crate::Music;
use crate::SoundBank;
use std::time::Instant;
#[derive(Debug)]
pub struct AudioStub {
last_now: Instant,
capture_buffer: Vec< f32 >,
}
impl AudioStub {
pub fn new() -> Self {
Self {
last_now: Instant::now(),
capture_buffer: Vec::new(),
}
}
pub fn update( &mut self ) -> f64 {
let timestep = self.last_now.elapsed().as_secs_f64();
self.last_now = Instant::now();
timestep
}
pub fn load_music( &mut self, fileloader: &mut impl FileLoader, filename: &str ) -> bool {
true
}
pub fn play_music( &mut self ) {
}
pub fn pause_music( &mut self ) {
}
pub fn load_sound_bank( &mut self, fileloader: &mut impl FileLoader, filename: &str ) {
}
pub fn play_sound( &mut self, name: &str ) {
}
pub fn capture( &mut self, size: usize ) {
}
pub fn capture_buffer_slice( &self ) -> &[f32] {
self.capture_buffer.as_slice()
}
}