mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
audio: mode selection
This commit is contained in:
@@ -19,8 +19,28 @@ typedef struct {
|
||||
#define AUDIO_STREAM_INFO_FORMAT 4
|
||||
#define AUDIO_STREAM_INFO_FIFO_FRAMES 5
|
||||
#define AUDIO_STREAM_INFO_PLAYED_FRAMES 6
|
||||
#define AUDIO_STREAM_INFO_SUPPORTED_FORMATS 7
|
||||
|
||||
#define AUDIO_FORMAT_S16_LE 0x10
|
||||
#define AUDIO_FORMAT_QUERY 0x00000000
|
||||
#define AUDIO_FORMAT_MU_LAW 0x00000001
|
||||
#define AUDIO_FORMAT_A_LAW 0x00000002
|
||||
#define AUDIO_FORMAT_IMA_ADPCM 0x00000004
|
||||
#define AUDIO_FORMAT_U8 0x00000008
|
||||
#define AUDIO_FORMAT_S16_LE 0x00000010
|
||||
#define AUDIO_FORMAT_S16_BE 0x00000020
|
||||
#define AUDIO_FORMAT_S8 0x00000040
|
||||
#define AUDIO_FORMAT_U16_LE 0x00000080
|
||||
#define AUDIO_FORMAT_U16_BE 0x00000100
|
||||
#define AUDIO_FORMAT_MPEG 0x00000200
|
||||
#define AUDIO_FORMAT_AC3 0x00000400
|
||||
#define AUDIO_FORMAT_VORBIS 0x00000800
|
||||
#define AUDIO_FORMAT_S32_LE 0x00001000
|
||||
#define AUDIO_FORMAT_S32_BE 0x00002000
|
||||
#define AUDIO_FORMAT_FLOAT 0x00004000
|
||||
#define AUDIO_FORMAT_S24_LE 0x00008000
|
||||
#define AUDIO_FORMAT_S24_BE 0x00010000
|
||||
#define AUDIO_FORMAT_SPDIF_RAW 0x00020000
|
||||
#define AUDIO_FORMAT_S24_PACKED 0x00040000
|
||||
|
||||
#define AUDIO_TRIGGER_INPUT 1
|
||||
#define AUDIO_TRIGGER_OUTPUT 2
|
||||
@@ -30,6 +50,9 @@ typedef struct {
|
||||
void (*stop)(audio_stream_t *);
|
||||
void (*wait_for_playback)(audio_stream_t *);
|
||||
void (*reset)(audio_stream_t *);
|
||||
int (*set_format)(audio_stream_t *, int format, int *selected);
|
||||
int (*set_speed)(audio_stream_t *, int speed, int *selected);
|
||||
int (*set_channels)(audio_stream_t *, int channels, int *selected);
|
||||
void (*get_info)(audio_stream_t *, int what, void *buf);
|
||||
} audio_stream_ops_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user