Skip to content

Commit 2a859c9

Browse files
tekkactekkac
tekkac
authored andcommitted
🐛 4-bit depth bug-fix WIP
1 parent 5d1b901 commit 2a859c9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/wave.cairo

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ impl WavToBytes of Into<WavFile, ByteArray> {
4848
if self.bits_per_sample == 4_u16 {
4949
while self.data.len()
5050
- count > 1 {
51-
bytes
52-
.append_byte(
53-
(*self.data[count] | *self.data[count + 1]).try_into().unwrap()
54-
);
51+
let byte: u32 = *self.data[count] * 0x10 + *self.data[count + 1];
52+
bytes.append_byte((byte).try_into().unwrap());
5553
count += 2;
5654
};
5755
} else {

0 commit comments

Comments
 (0)