[log] Fix default log level

This commit is contained in:
2024-02-21 10:11:42 +05:30
parent a359a8370f
commit 3f5053ccaa
2 changed files with 6 additions and 1 deletions

View File

@@ -35,6 +35,9 @@ impl<'a> AudioProcessor<'a> {
pub fn queue(&mut self) -> EmulatorResult<()> { pub fn queue(&mut self) -> EmulatorResult<()> {
let audio_base_reg = (self.get_audio_base_reg() as u32) << 8; let audio_base_reg = (self.get_audio_base_reg() as u32) << 8;
let fb = self.frame_buffer.as_mut(); let fb = self.frame_buffer.as_mut();
// The CPU frame timing is just a little less than 60 fps to prevent audio stutter.
// We will then wait for audio to drain to adjust frame timing
if self.audio_queue.size() == 0 { if self.audio_queue.size() == 0 {
log::trace!("Detected Queue empty!"); log::trace!("Detected Queue empty!");
} }
@@ -42,6 +45,8 @@ impl<'a> AudioProcessor<'a> {
::std::thread::sleep(Duration::from_micros(1)) ::std::thread::sleep(Duration::from_micros(1))
} }
self.ram.try_copy_block(audio_base_reg, fb)?; self.ram.try_copy_block(audio_base_reg, fb)?;
//convert to u8 audio format (Bytepusher stores it as "i8")
fb.iter_mut().for_each(|item|{ fb.iter_mut().for_each(|item|{
*item^= 0x80; *item^= 0x80;
}); });

View File

@@ -27,7 +27,7 @@ mod graphics;
fn main() -> EmulatorResult<()> { fn main() -> EmulatorResult<()> {
let BytePusherArgs { file_name } = BytePusherArgs::parse(); let BytePusherArgs { file_name } = BytePusherArgs::parse();
SimpleLogger::new().env().init().unwrap(); SimpleLogger::new().with_level(LevelFilter::Info).env().init().unwrap();
let (file_bytes, x) = try_load_rom(&file_name)?; let (file_bytes, x) = try_load_rom(&file_name)?;