From ce785534fedf0352547e859f20319263bb28bdad Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Wed, 9 Oct 2019 09:38:38 +0200 Subject: [PATCH] Set sample_rate attribute of ds_audio_buffer in NO_SOX client --- native_client/client.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/native_client/client.cc b/native_client/client.cc index b63e5bec..afde6cd8 100644 --- a/native_client/client.cc +++ b/native_client/client.cc @@ -221,6 +221,7 @@ GetAudioBuffer(const char* path) unsigned int sample_rate; fseek(wave, 24, SEEK_SET); rv = fread(&sample_rate, 4, 1, wave); + res.sample_rate = (int)sample_rate; unsigned short bits_per_sample; fseek(wave, 34, SEEK_SET); rv = fread(&bits_per_sample, 2, 1, wave);