diff options
| author | steven-na <noreply.github@stvnc.dev> | 2026-08-05 21:23:31 -0700 |
|---|---|---|
| committer | steven-na <noreply.github@stvnc.dev> | 2026-08-05 21:23:31 -0700 |
| commit | 1646dfb9159e66c30821a5659e8f0a5eb3d52f05 (patch) | |
| tree | f6d4b6a876af0d35af832e8cdc312ff8777f548c /src/wav.c | |
| parent | e0e52953570caea66096cda08dc814f34735f7af (diff) | |
Formatting, bug fix, test coverage
Diffstat (limited to 'src/wav.c')
| -rw-r--r-- | src/wav.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -254,9 +254,11 @@ f64 *read_32bps_float_data(smrt_arena_t *arena, wav_data_t data, u16 num_channel u8 two = data.samples[(i*4*num_channels)+1+channel*4]; u8 three = data.samples[(i*4*num_channels)+2+channel*4]; u8 four = data.samples[(i*4*num_channels)+3+channel*4]; - u32 intermediate = one | two << 8 | three << 16 | four << 24; + u32 intermediate = one | two << 8 | three << 16 | (u32)four << 24; - memcpy(&vs[i], &intermediate, sizeof(u32)); + f32 f; + memcpy(&f, &intermediate, sizeof(f32)); + vs[i] = (f64)f; } return vs; |