Fix exit issue

Fixed an issue whereby the 3DS would crash when attempting to exit the
3DSX version of ctrmus.

Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
Mahyar Koshkouei
2017-01-10 21:08:05 +00:00
parent 27ee6af2e1
commit 5878bd0dcc
3 changed files with 8 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ struct decoder_fn
{
int (* init)(const char* file);
uint32_t (* rate)(void);
uint8_t (*channels)(void);
uint8_t (* channels)(void);
int buffSize;
uint64_t (* decode)(void*);
void (* exit)(void);

View File

@@ -19,11 +19,6 @@ int playFile(const char* file)
bool lastbuf = false;
printf("Here: %d\n", __LINE__);
if(R_FAILED(ndspInit()))
{
printf("Initialising ndsp failed.");
goto out;
}
switch(getFileType(file))
{
@@ -50,6 +45,12 @@ int playFile(const char* file)
return 0;
}
if(R_FAILED(ndspInit()))
{
printf("Initialising ndsp failed.");
goto out;
}
printf("Here: %d\n", __LINE__);
buffer1 = linearAlloc(decoder.buffSize * sizeof(int16_t));
buffer2 = linearAlloc(decoder.buffSize * sizeof(int16_t));