Skip to content
Snippets Groups Projects
Verified Commit 7ae88457 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

chore: improved on audio signature

parent c81ead8a
No related branches found
No related tags found
No related merge requests found
Pipeline #3069 passed
......@@ -9,12 +9,12 @@ pub struct Audio {
}
impl Audio {
pub fn new(sdl: &Sdl, freq: Option<i32>, channels: Option<u8>, samples: Option<u16>) -> Self {
pub fn new(sdl: &Sdl, freq: i32, channels: u8, samples: Option<u16>) -> Self {
let audio_subsystem = sdl.audio().unwrap();
let desired_spec = AudioSpecDesired {
freq: Some(freq.unwrap_or(44100)),
channels: Some(channels.unwrap_or(2)),
freq: Some(freq),
channels: Some(channels),
samples: Some(samples.unwrap_or(4096)),
};
......
......@@ -207,8 +207,8 @@ impl Emulator {
pub fn start_audio(&mut self, sdl: &Sdl) {
self.audio = Some(Audio::new(
sdl,
Some(self.system.audio_sampling_rate() as i32),
Some(self.system.audio_channels()),
self.system.audio_sampling_rate() as i32,
self.system.audio_channels(),
None,
));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment