Files
mice-3ds/source/error.c
Mahyar Koshkouei 808ae2cc91 Fix Vorbis playback
Tested with a stereo OGG Vorbis file only.

Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
2017-07-08 13:51:20 +01:00

40 lines
658 B
C

#include "error.h"
#include <errno.h>
#include <string.h>
/**
* Return string describing error number. Extends strerror to include some
* custom errors used in ctrmus.
*
* \param err Error number.
*/
char* ctrmus_strerror(int err)
{
char* error;
switch(err)
{
case NDSP_INIT_FAIL:
error = "NDSP Initialisation failed";
break;
case DECODER_INIT_FAIL:
error = "Unable to initialised decoder";
break;
case FILE_NOT_SUPPORTED:
error = "File type is not supported";
break;
case UNSUPPORTED_CHANNELS:
error = "Unsupported number of channels";
break;
default:
error = strerror(err);
break;
}
return error;
}