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:
@@ -6,16 +6,6 @@
|
||||
/* Channel to play music on */
|
||||
#define CHANNEL 0x08
|
||||
|
||||
enum file_types
|
||||
{
|
||||
FILE_TYPE_ERROR = -1,
|
||||
FILE_TYPE_WAV,
|
||||
FILE_TYPE_FLAC,
|
||||
FILE_TYPE_VORBIS,
|
||||
FILE_TYPE_OPUS,
|
||||
FILE_TYPE_MP3
|
||||
};
|
||||
|
||||
struct decoder_fn
|
||||
{
|
||||
int (* init)(const char* file);
|
||||
@@ -49,14 +39,6 @@ void stopPlayback(void);
|
||||
*/
|
||||
bool isPlaying(void);
|
||||
|
||||
/**
|
||||
* Obtains file type.
|
||||
*
|
||||
* \param file File location.
|
||||
* \return File type, else negative and errno set.
|
||||
*/
|
||||
int getFileType(const char *file);
|
||||
|
||||
/**
|
||||
* Should only be called from a new thread only, and have only one playback
|
||||
* thread at time. This function has not been written for more than one
|
||||
|
||||
Reference in New Issue
Block a user