From 4b8ca4ab6fc094017a1d22e67764594860810478 Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Thu, 12 Jan 2017 12:11:38 +0000 Subject: [PATCH] Remove debugging Additionally increased the maximum size of the directory path to display by a whopping 3 characters. Signed-off-by: Mahyar Koshkouei --- include/dr_libs | 2 +- source/all.h | 2 +- source/main.c | 3 +-- source/playback.c | 8 -------- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/include/dr_libs b/include/dr_libs index f93c24e..9b86194 160000 --- a/include/dr_libs +++ b/include/dr_libs @@ -1 +1 @@ -Subproject commit f93c24e5692cb55040a404fee39ad6517bcb2e8d +Subproject commit 9b86194035dbd10fe068e958023d49bcc901aba6 diff --git a/source/all.h b/source/all.h index 85d8456..8cd5950 100644 --- a/source/all.h +++ b/source/all.h @@ -4,7 +4,7 @@ #define CHANNEL 0x08 /* Adds extra debugging text */ -#define DEBUG +//#define DEBUG /* Prints more error information */ #define err_print(err) \ diff --git a/source/main.c b/source/main.c index 73beddc..6aa5766 100644 --- a/source/main.c +++ b/source/main.c @@ -215,7 +215,6 @@ out: gfxExit(); sdmcExit(); - puts("Return"); return 0; err: @@ -254,7 +253,7 @@ int listDir(int from, int max, int select) if(wd == NULL) goto err; - printf("Dir: %.30s\n", wd); + printf("Dir: %.33s\n", wd); if((dp = opendir(wd)) == NULL) goto err; diff --git a/source/playback.c b/source/playback.c index 29298f5..506caae 100644 --- a/source/playback.c +++ b/source/playback.c @@ -19,8 +19,6 @@ int playFile(const char* file) bool lastbuf = false; int ret; - printf("Here: %d\n", __LINE__); - switch(getFileType(file)) { case FILE_TYPE_WAV: @@ -50,19 +48,15 @@ int playFile(const char* file) goto out; } - printf("Here: %d\n", __LINE__); if((ret = (*decoder.init)(file)) != 0) { printf("Error initialising decoder: %d\n", ret); goto out; } - printf("Here: %d\n", __LINE__); buffer1 = linearAlloc(decoder.buffSize * sizeof(int16_t)); buffer2 = linearAlloc(decoder.buffSize * sizeof(int16_t)); - printf("Here: %d\n", __LINE__); - #ifdef DEBUG printf("\nRate: %lu\tChan: %d\n", (*decoder.rate)(), (*decoder.channels)()); #endif @@ -75,13 +69,11 @@ int playFile(const char* file) ndspChnSetFormat(CHANNEL, (*decoder.channels)() == 2 ? NDSP_FORMAT_STEREO_PCM16 : NDSP_FORMAT_MONO_PCM16); - printf("Here: %d\n", __LINE__); memset(waveBuf, 0, sizeof(waveBuf)); waveBuf[0].nsamples = (*decoder.decode)(&buffer1[0]) / (*decoder.channels)(); waveBuf[0].data_vaddr = &buffer1[0]; ndspChnWaveBufAdd(CHANNEL, &waveBuf[0]); - printf("Here: %d\n", __LINE__); waveBuf[1].nsamples = (*decoder.decode)(&buffer2[0]) / (*decoder.channels)(); waveBuf[1].data_vaddr = &buffer2[0];