X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=snd_main.h;h=62c5034297058b802394ed65658e2bf905767ac1;hp=07cc6e114afe269b2b9b160fd06c621d3858fd31;hb=d2ba4a8ed129ea666d17e21b30edbba56aef7c1c;hpb=65f6c04779aa58c69929e0d22967bf152dac17c1 diff --git a/snd_main.h b/snd_main.h index 07cc6e11..62c50342 100644 --- a/snd_main.h +++ b/snd_main.h @@ -110,12 +110,6 @@ struct snd_fetcher_s snd_fetcher_getfmt_t getfmt; }; -// 0 to NUM_AMBIENTS - 1 = water, etc -// NUM_AMBIENTS to NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS - 1 = normal entity sounds -// NUM_AMBIENTS + MAX_DYNAMIC_CHANNELS to total_channels = static sounds -#define MAX_DYNAMIC_CHANNELS 512 -#define MAX_CHANNELS 1028 - extern unsigned int total_channels; extern channel_t channels[MAX_CHANNELS]; @@ -142,6 +136,15 @@ extern mempool_t *snd_mempool; extern qboolean simsound; +#define STREAM_BUFFER_DURATION 0.3f // in seconds +#define STREAM_BUFFER_FILL 0.2f // in seconds +#define STREAM_BUFFER_SIZE(format_ptr) ((int)ceil (STREAM_BUFFER_DURATION * (format_ptr)->speed) * (format_ptr)->width * (format_ptr)->channels) + +// We work with 1 sec sequences, so this buffer must be able to contain +// 1 sec of sound of the highest quality (48 KHz, 16 bit samples, stereo) +extern unsigned char resampling_buffer [48000 * 2 * 2]; + + // ==================================================================== // Architecture-independent functions // ====================================================================