Unverified Commit c3c9b6b0 authored by Daniel's avatar Daniel Committed by GitHub
Browse files

Update Audio.cpp

parent dee81c34
...@@ -237,7 +237,6 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen) ...@@ -237,7 +237,6 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen)
size_t nOffset = 0; size_t nOffset = 0;
#define WAV_HEADER_SIZE 44
speech_len = nBufLen / 2; speech_len = nBufLen / 2;
speech_align_len = (int)(ceil((float)speech_len / align_size) * align_size); speech_align_len = (int)(ceil((float)speech_len / align_size) * align_size);
...@@ -263,6 +262,8 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen) ...@@ -263,6 +262,8 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen)
speech_data[i] = (float)speech_buff[i] / scale; speech_data[i] = (float)speech_buff[i] / scale;
} }
AudioFrame* frame = new AudioFrame(speech_len);
frame_queue.push(frame);
return true; return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment