X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsound.h;h=146623433f4c2a997e19ee20c99e3be41a3236a4;hb=19db00ff98326cb4b92cea42080d7094e0842243;hp=cb606b0b4424f5b227a0d215fab24cf0840442a6;hpb=caed1f8c1a80db15b94da8a59bba3e95f7bd06db;p=rocksndiamonds.git diff --git a/src/libgame/sound.h b/src/libgame/sound.h index cb606b0b..14662343 100644 --- a/src/libgame/sound.h +++ b/src/libgame/sound.h @@ -55,6 +55,11 @@ #define AUDIO_MONO_CHANNEL 1 #define AUDIO_STEREO_CHANNELS 2 +#define AUDIO_FORMAT_U8 (1 << 0) +#define AUDIO_FORMAT_S16 (1 << 1) +#define AUDIO_FORMAT_LE (1 << 2) +#define AUDIO_FORMAT_BE (1 << 3) + #if defined(TARGET_SDL) /* one second fading interval == 1000 ticks (milliseconds) */ #define SOUND_FADING_INTERVAL 1000 @@ -179,14 +184,22 @@ struct SoundHeader_8SVX }; #endif +struct AudioFormatInfo +{ + boolean stereo; /* availability of stereo sound */ + int format; /* size and endianess of sample data */ + int sample_rate; /* sample frequency */ + int fragment_size; /* audio device fragment size in bytes */ +}; + struct SampleInfo { - char *source_filename; - int type; + char *source_filename; - void *data_ptr; long data_len; + void *data_ptr; + int format; }; typedef struct SampleInfo SoundInfo; @@ -210,8 +223,9 @@ struct SoundControl int playingtime; long playingpos; - unsigned long data_len; - byte *data_ptr; + long data_len; + void *data_ptr; + int format; #if defined(PLATFORM_MSDOS) int voice;