Refactor for testing

Added basic decoding functionality to test.

Refactored some code to stop 3DS specific code from compiling on
GNU/Linux.

Tested working by running the test executable on GNU/Linux. Vorbis
decoding has many errors detected by valgrind (but still decodes
successfully).
Opus, flac, and mp3 decoding work without errors.

Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
This commit is contained in:
Mahyar Koshkouei
2017-08-14 23:14:45 +01:00
parent 11d7bede77
commit ef0289bceb
8 changed files with 190 additions and 105 deletions

View File

@@ -1,4 +1,6 @@
#if defined __arm__
#include <3ds.h>
#endif
/* Errors that can't be explained with errno */
#define NDSP_INIT_FAIL 1000
@@ -6,6 +8,8 @@
#define FILE_NOT_SUPPORTED 1002
#define UNSUPPORTED_CHANNELS 1003
#if defined __arm__
/**
* Struct to help error handling across threads.
*/
@@ -28,3 +32,5 @@ struct errInfo_t
* \param err Error number.
*/
char* ctrmus_strerror(int err);
#endif