Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
buffer with 32mb instead of 32kb
Browse files Browse the repository at this point in the history
  • Loading branch information
Frooastside committed Apr 29, 2024
1 parent 7837295 commit dad8a9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crunchy-cli-core/src/utils/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,14 @@ fn generate_chromaprint(
// the stdout is read in chunks because keeping all the raw audio data in memory would take up
// a significant amount of space
let mut stdout = handle.stdout.take().unwrap();
let mut buf: [u8; 32_000] = [0; 32_000];
let mut buf: [u8; 32_000_000] = [0; 32_000_000];
while handle.try_wait()?.is_none() {
loop {
let read_bytes = stdout.read(&mut buf)?;
if read_bytes == 0 {
break;
}
let data: [i16; 16_000] = unsafe { mem::transmute(buf) };
let data: [i16; 16_000_000] = unsafe { mem::transmute(buf) };
printer.consume(&data[0..(read_bytes / 2)])
}
}
Expand Down

0 comments on commit dad8a9f

Please sign in to comment.