Skip to content

Commit

Permalink
more log with audio-mixer
Browse files Browse the repository at this point in the history
  • Loading branch information
giangndm committed Nov 8, 2024
1 parent 02014a0 commit 7c806c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/media_record/src/convert/composer/audio_mixer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl AudioMixer {
}
let decoder = self.tracks.get_mut(&(session_id, remote_track_id))?;
let len = decoder.decode(&media_packet.data, &mut self.audio_tmp)?;
log::trace!("decode {} {} {} {} => {}", session_id, remote_track_id, media_packet.seq, media_packet.data.len(), len);
log::debug!("decode {} {} {} {} => {}", session_id, remote_track_id, media_packet.seq, media_packet.data.len(), len);
if let Some((ts, frame)) = self.mixer.push(ts, (session_id, remote_track_id), &self.audio_tmp[..len]) {
let len = self.encoder.encode(&frame, &mut self.audio_encoded)?;
let media = MediaPacket::build_audio(0, 0, None, self.audio_encoded[..len].to_vec());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl<TID: Hash + Eq + Copy> MixerBuffer<TID> {
/// otherwise returns `None`
pub fn push(&mut self, ts: u64, track_id: TID, data: &[i16]) -> Option<(u64, Vec<i16>)> {
let frame_idx = self.push_data_to_frame(ts, track_id, data)?;
log::trace!("push data to frame: {}", frame_idx);
log::debug!("push data to frame: {}", frame_idx);
// we pop front frame if all tracks are mixed or the frame is too old
if self.frames.len() > FRAME_QUEUE_LIMIT {
self.force_pop()
Expand Down

0 comments on commit 7c806c8

Please sign in to comment.