fix DEBUG calls

This commit is contained in:
LiquidFenrir
2018-05-11 15:59:17 +02:00
parent 403453c3fc
commit 3dad4e2a67
3 changed files with 4 additions and 10 deletions

View File

@@ -46,7 +46,7 @@ static u16 * camera_buf = NULL;
void exit_qr(qr_data *data) void exit_qr(qr_data *data)
{ {
DEBUG("Exiting QR"); DEBUG("Exiting QR\n");
svcSignalEvent(data->cancel); svcSignalEvent(data->cancel);
while(!data->finished) while(!data->finished)
svcSleepThread(1000000); svcSleepThread(1000000);

View File

@@ -487,9 +487,7 @@ Result load_audio(Entry_s entry, audio_s *audio)
int e = ov_open(file, &audio->vf, NULL, 0); int e = ov_open(file, &audio->vf, NULL, 0);
if (e < 0) if (e < 0)
{ {
char error[50]; DEBUG("Vorbis: %d\n", e);
sprintf(error, "Vorbis: %d\n", e);
DEBUG(error);
return MAKERESULT(RL_FATAL, RS_INVALIDARG, RM_APPLICATION, RD_NO_DATA); return MAKERESULT(RL_FATAL, RS_INVALIDARG, RM_APPLICATION, RD_NO_DATA);
} }

View File

@@ -31,9 +31,7 @@
Result update_audio(audio_s *audio) Result update_audio(audio_s *audio)
{ {
long size = audio->wave_buf[audio->buf_pos].nsamples * 4 - audio->data_read; long size = audio->wave_buf[audio->buf_pos].nsamples * 4 - audio->data_read;
char size_info[50] = {0}; DEBUG("Audio Size: %ld\n", size);
sprintf(size_info, "Audio Size: %ld\n", size);
DEBUG(size_info);
if (audio->wave_buf[audio->buf_pos].status == NDSP_WBUF_DONE) // only run if the current selected buffer has already finished playing if (audio->wave_buf[audio->buf_pos].status == NDSP_WBUF_DONE) // only run if the current selected buffer has already finished playing
{ {
size_t read = ov_read(&audio->vf, (char*)audio->wave_buf[audio->buf_pos].data_vaddr + audio->data_read, size, NULL); // read 1 vorbis packet into wave buffer size_t read = ov_read(&audio->vf, (char*)audio->wave_buf[audio->buf_pos].data_vaddr + audio->data_read, size, NULL); // read 1 vorbis packet into wave buffer
@@ -46,9 +44,7 @@ Result update_audio(audio_s *audio)
ov_open(fmemopen(audio->filebuf, audio->filesize, "rb"), &audio->vf, NULL, 0); // Reopen file. Don't need to reinit channel stuff since it's all the same as before ov_open(fmemopen(audio->filebuf, audio->filesize, "rb"), &audio->vf, NULL, 0); // Reopen file. Don't need to reinit channel stuff since it's all the same as before
} else // Error :( } else // Error :(
{ {
char error[100] = {0}; DEBUG("Vorbis play error: %d\n", read);
sprintf(error, "Vorbis play error: %d\n", read);
DEBUG(error);
ndspChnReset(0); ndspChnReset(0);
return MAKERESULT(RL_FATAL, RS_INVALIDARG, RM_APPLICATION, RD_NO_DATA); return MAKERESULT(RL_FATAL, RS_INVALIDARG, RM_APPLICATION, RD_NO_DATA);
} }