Fix WAV playback

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
Mahyar Koshkouei
2017-01-11 23:19:29 +00:00
parent 06ad05e332
commit fcf538031f
3 changed files with 7 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ uint32_t rateWav(void)
*/
uint8_t channelWav(void)
{
return (header[23]<<8) + (header[22]);
return channels;
}
/**
@@ -106,7 +106,7 @@ uint8_t channelWav(void)
*/
uint64_t readWav(void* buffer)
{
return fread(buffer, 1, buffSize, pWav) / channels;
return fread(buffer, 1, buffSize, pWav) / sizeof(int16_t);
}
/**