Skip to content

Commit

Permalink
add comment to voice_data.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
LaihoE committed Dec 21, 2023
1 parent dce3aac commit f390b91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parser/src/voice_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use opus::Decoder;
use rayon::iter::IntoParallelRefIterator;
use rayon::iter::ParallelIterator;
use std::{i16, time::Instant};

use crate::read_bits::DemoParserError;


#[derive(Debug)]
struct VoicePacket {
pub length: u16,
Expand All @@ -16,6 +16,7 @@ const FRAME_SIZE: usize = 480;
const AVG_BYTES_PER_PACKET: usize = 1600;

pub fn parse_voice_chunk(bytes: &[u8], decoder: &mut Decoder) -> Vec<i16> {
// based on https://github.com/DandrewsDev/CS2VoiceData
let mut decoded_bytes = vec![];
let packet = VoicePacket {
// sample_rate: u16::from_le_bytes(bytes[9..11].try_into().unwrap()),
Expand Down

0 comments on commit f390b91

Please sign in to comment.