Fixed bug with 16bit sample size
This commit is contained in:
parent
91f799ded2
commit
fb06d9d144
1 changed files with 1 additions and 1 deletions
|
@ -256,7 +256,7 @@ global Sample* LoadWav(const char* name, int flags __attribute__((unused)))
|
|||
//
|
||||
// Read sample
|
||||
//
|
||||
sample = malloc(sizeof(*sample) + WAV_BUFFER_SIZE*wavfmt.Channels);
|
||||
sample = malloc(sizeof(*sample) + WAV_BUFFER_SIZE * wavfmt.Channels * wavfmt.SampleSize);
|
||||
sample->Channels = wavfmt.Channels;
|
||||
sample->SampleSize = wavfmt.SampleSize * 8 / sample->Channels;
|
||||
sample->Frequency = wavfmt.Frequency;
|
||||
|
|
Loading…
Add table
Reference in a new issue