Set sample_rate attribute of ds_audio_buffer in NO_SOX client

This commit is contained in:
Reuben Morais 2019-10-09 09:38:38 +02:00
parent 031479d88b
commit ce785534fe
1 changed files with 1 additions and 0 deletions

View File

@ -221,6 +221,7 @@ GetAudioBuffer(const char* path)
unsigned int sample_rate; unsigned int sample_rate;
fseek(wave, 24, SEEK_SET); rv = fread(&sample_rate, 4, 1, wave); fseek(wave, 24, SEEK_SET); rv = fread(&sample_rate, 4, 1, wave);
res.sample_rate = (int)sample_rate;
unsigned short bits_per_sample; unsigned short bits_per_sample;
fseek(wave, 34, SEEK_SET); rv = fread(&bits_per_sample, 2, 1, wave); fseek(wave, 34, SEEK_SET); rv = fread(&bits_per_sample, 2, 1, wave);