Refactor Opus decoder
Created generic playback handler, first with Opus support. Other decoders to follow. This is to remove duplicated code. 3DSX tested working with citra and N3DS. Signed-off-by: Mahyar Koshkouei <deltabeard@users.noreply.github.com>
This commit is contained in:
12
source/all.h
12
source/all.h
@@ -4,9 +4,19 @@
|
||||
#define CHANNEL 0x08
|
||||
|
||||
/* Adds extra debugging text */
|
||||
//#define DEBUG
|
||||
#define DEBUG
|
||||
|
||||
/* Prints more error information */
|
||||
#define err_print(err) \
|
||||
do { fprintf(stderr, "\nError %d:%s(): %s %s\n", __LINE__, __func__, \
|
||||
err, strerror(errno)); } while (0)
|
||||
|
||||
struct decoder_fn
|
||||
{
|
||||
int (* init)(const char* file);
|
||||
uint32_t (* rate)(void);
|
||||
uint8_t channels;
|
||||
int buffSize;
|
||||
uint64_t (* decode)(void*);
|
||||
void (* exit)(void);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user