diff --git a/src/audio_file.rs b/src/audio_file.rs index 1b4aa81a..6354efb4 100644 --- a/src/audio_file.rs +++ b/src/audio_file.rs @@ -106,11 +106,8 @@ impl audio_file2::Handler for AudioFileInternal { bitmap.insert(index); self.shared.cond.notify_all(); - println!("{}/{} {:?}", bitmap.len(), self.chunk_count, *bitmap); - // If all blocks are complete when can stop if bitmap.len() >= self.chunk_count { - println!("All good"); drop(bitmap); self.write_file.seek(SeekFrom::Start(0)).unwrap(); self.complete_tx.complete(self.write_file); @@ -145,10 +142,6 @@ impl audio_file2::Handler for AudioFileInternal { bitmap.insert(index); self.shared.cond.notify_all(); - println!("{:?}", *bitmap); - - println!("{} {}", bitmap.len(), self.chunk_count); - // If all blocks are complete when can stop if bitmap.len() >= self.chunk_count { drop(bitmap); diff --git a/src/audio_file2.rs b/src/audio_file2.rs index 873a53af..d90b5668 100644 --- a/src/audio_file2.rs +++ b/src/audio_file2.rs @@ -61,7 +61,6 @@ impl stream::Handler for AudioFile { } fn on_header(mut self, header_id: u8, header_data: &[u8], session: &Session) -> stream::Response { - //println!("on_header"); match self.handler.on_header(header_id, header_data, session) { Response::Continue(handler) => { self.handler = handler; @@ -77,7 +76,6 @@ impl stream::Handler for AudioFile { } fn on_data(mut self, data: &[u8], session: &Session) -> stream::Response { - //println!("on_data"); match self.handler.on_data(self.offset, data, session) { Response::Continue(handler) => { self.handler = handler; @@ -85,7 +83,6 @@ impl stream::Handler for AudioFile { stream::Response::Continue(self) } Response::Seek(handler, offset) => { - println!("seek request {}", offset); self.handler = handler; self.offset = offset; stream::Response::Spawn(self) @@ -100,11 +97,9 @@ impl stream::Handler for AudioFile { } fn on_error(mut self, session: &Session) -> stream::Response { - println!("on_error"); match self.handler.on_eof(session) { Response::Continue(_) => stream::Response::Close, Response::Seek(handler, offset) => { - println!("seek request {}", offset); self.handler = handler; self.offset = offset; stream::Response::Spawn(self) diff --git a/src/player.rs b/src/player.rs index 72e391fe..95d6d25b 100644 --- a/src/player.rs +++ b/src/player.rs @@ -285,14 +285,11 @@ impl PlayerInternal { Some(PlayerCommand::SeekAt(position, measured_at)) => { let position = (util::now_ms() - measured_at + position as i64) as u32; - let before = util::now_ms(); vorbis_time_seek_ms(decoder.as_mut().unwrap(), position as i64).unwrap(); self.update(|state| { state.position_ms = vorbis_time_tell_ms(decoder.as_mut().unwrap()).unwrap() as u32; state.position_measured_at = util::now_ms(); - println!("SEEK: {} {} {}", before, util::now_ms(), util::now_ms() - before); - true }); } diff --git a/src/stream.rs b/src/stream.rs index 7239ee56..83d6ef23 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -51,7 +51,7 @@ impl Channel { packet.read_u16::().unwrap(); // Skip channel id if cmd == 0xa { - println!("error: {} {}", data.len(), packet.read_u16::().unwrap()); + error!("error: {} {}", data.len(), packet.read_u16::().unwrap()); return match handler.box_on_error(session) { Response::Continue(_) => Response::Close, Response::Spawn(f) => Response::Spawn(f),