vorbis and buffering
This commit is contained in:
parent
b2e83e695d
commit
c6960ffb9f
7 changed files with 158 additions and 18 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ extern "C" {
|
|||
typedef struct _MDESoundDriver MDESoundDriverRec, *MDESoundDriver;
|
||||
typedef struct _MDESoundContext* MDESoundContext;
|
||||
typedef struct _MDESound* MDESound;
|
||||
typedef struct _MDESoundBuffer MDESoundBuffer;
|
||||
|
||||
struct _MDESoundContext {
|
||||
int sample_rate;
|
||||
|
|
@ -30,12 +31,20 @@ struct _MDESoundDriver {
|
|||
void (*seek)(MDESoundContext context, int frames);
|
||||
};
|
||||
|
||||
struct _MDESoundBuffer {
|
||||
short* data;
|
||||
int frames;
|
||||
int seek;
|
||||
};
|
||||
|
||||
struct _MDESound {
|
||||
MDESoundContext context;
|
||||
MDESoundDriver driver;
|
||||
MDESoundBuffer* buffer;
|
||||
};
|
||||
|
||||
extern MDESoundDriver MDESoundDriverMP3;
|
||||
extern MDESoundDriver MDESoundDriverVorbis;
|
||||
|
||||
MDESound MDESoundOpen(const char* path);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue