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

@@ -17,6 +17,7 @@ int playFile(const char* file)
ndspWaveBuf waveBuf[2];
bool playing = true;
bool lastbuf = false;
int ret;
printf("Here: %d\n", __LINE__);
@@ -54,8 +55,11 @@ int playFile(const char* file)
buffer2 = linearAlloc(decoder.buffSize * sizeof(int16_t));
printf("Here: %d\n", __LINE__);
if((*decoder.init)(file) != 0)
if((ret = (*decoder.init)(file)) != 0)
{
printf("Error initialising decoder: %d\n", ret);
goto out;
}
printf("Here: %d\n", __LINE__);