Remove debugging
Additionally increased the maximum size of the directory path to display by a whopping 3 characters. Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
Submodule include/dr_libs updated: f93c24e569...9b86194035
@@ -4,7 +4,7 @@
|
|||||||
#define CHANNEL 0x08
|
#define CHANNEL 0x08
|
||||||
|
|
||||||
/* Adds extra debugging text */
|
/* Adds extra debugging text */
|
||||||
#define DEBUG
|
//#define DEBUG
|
||||||
|
|
||||||
/* Prints more error information */
|
/* Prints more error information */
|
||||||
#define err_print(err) \
|
#define err_print(err) \
|
||||||
|
|||||||
@@ -215,7 +215,6 @@ out:
|
|||||||
|
|
||||||
gfxExit();
|
gfxExit();
|
||||||
sdmcExit();
|
sdmcExit();
|
||||||
puts("Return");
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
@@ -254,7 +253,7 @@ int listDir(int from, int max, int select)
|
|||||||
if(wd == NULL)
|
if(wd == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
printf("Dir: %.30s\n", wd);
|
printf("Dir: %.33s\n", wd);
|
||||||
|
|
||||||
if((dp = opendir(wd)) == NULL)
|
if((dp = opendir(wd)) == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ int playFile(const char* file)
|
|||||||
bool lastbuf = false;
|
bool lastbuf = false;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("Here: %d\n", __LINE__);
|
|
||||||
|
|
||||||
switch(getFileType(file))
|
switch(getFileType(file))
|
||||||
{
|
{
|
||||||
case FILE_TYPE_WAV:
|
case FILE_TYPE_WAV:
|
||||||
@@ -50,19 +48,15 @@ int playFile(const char* file)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Here: %d\n", __LINE__);
|
|
||||||
if((ret = (*decoder.init)(file)) != 0)
|
if((ret = (*decoder.init)(file)) != 0)
|
||||||
{
|
{
|
||||||
printf("Error initialising decoder: %d\n", ret);
|
printf("Error initialising decoder: %d\n", ret);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Here: %d\n", __LINE__);
|
|
||||||
buffer1 = linearAlloc(decoder.buffSize * sizeof(int16_t));
|
buffer1 = linearAlloc(decoder.buffSize * sizeof(int16_t));
|
||||||
buffer2 = linearAlloc(decoder.buffSize * sizeof(int16_t));
|
buffer2 = linearAlloc(decoder.buffSize * sizeof(int16_t));
|
||||||
|
|
||||||
printf("Here: %d\n", __LINE__);
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("\nRate: %lu\tChan: %d\n", (*decoder.rate)(), (*decoder.channels)());
|
printf("\nRate: %lu\tChan: %d\n", (*decoder.rate)(), (*decoder.channels)());
|
||||||
#endif
|
#endif
|
||||||
@@ -75,13 +69,11 @@ int playFile(const char* file)
|
|||||||
ndspChnSetFormat(CHANNEL,
|
ndspChnSetFormat(CHANNEL,
|
||||||
(*decoder.channels)() == 2 ? NDSP_FORMAT_STEREO_PCM16 :
|
(*decoder.channels)() == 2 ? NDSP_FORMAT_STEREO_PCM16 :
|
||||||
NDSP_FORMAT_MONO_PCM16);
|
NDSP_FORMAT_MONO_PCM16);
|
||||||
printf("Here: %d\n", __LINE__);
|
|
||||||
|
|
||||||
memset(waveBuf, 0, sizeof(waveBuf));
|
memset(waveBuf, 0, sizeof(waveBuf));
|
||||||
waveBuf[0].nsamples = (*decoder.decode)(&buffer1[0]) / (*decoder.channels)();
|
waveBuf[0].nsamples = (*decoder.decode)(&buffer1[0]) / (*decoder.channels)();
|
||||||
waveBuf[0].data_vaddr = &buffer1[0];
|
waveBuf[0].data_vaddr = &buffer1[0];
|
||||||
ndspChnWaveBufAdd(CHANNEL, &waveBuf[0]);
|
ndspChnWaveBufAdd(CHANNEL, &waveBuf[0]);
|
||||||
printf("Here: %d\n", __LINE__);
|
|
||||||
|
|
||||||
waveBuf[1].nsamples = (*decoder.decode)(&buffer2[0]) / (*decoder.channels)();
|
waveBuf[1].nsamples = (*decoder.decode)(&buffer2[0]) / (*decoder.channels)();
|
||||||
waveBuf[1].data_vaddr = &buffer2[0];
|
waveBuf[1].data_vaddr = &buffer2[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user