mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[sound] Clean up white space in snd_internal.h
This commit is contained in:
parent
7bbfde03fc
commit
5ab88b0137
1 changed files with 22 additions and 23 deletions
|
@ -91,34 +91,33 @@ typedef void sfxpaint_t (int offset, channel_t *ch, float *buffer,
|
||||||
/** Represent a single output frame in the mixer.
|
/** Represent a single output frame in the mixer.
|
||||||
*/
|
*/
|
||||||
struct portable_samplepair_s {
|
struct portable_samplepair_s {
|
||||||
float left; //!< left sample
|
float left; //!< left sample
|
||||||
float right; //!< right sample
|
float right; //!< right sample
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Sound system state
|
/** Sound system state
|
||||||
*/
|
*/
|
||||||
struct snd_s {
|
struct snd_s {
|
||||||
int speed; //!< sample rate
|
int speed; //!< sample rate
|
||||||
int samplebits; //!< bits per sample
|
int samplebits; //!< bits per sample
|
||||||
int channels; //!< number of output channels
|
int channels; //!< number of output channels
|
||||||
int frames; //!< frames in buffer
|
int frames; //!< frames in buffer
|
||||||
//!< 1 frame = channels samples
|
//!< 1 frame = channels samples
|
||||||
int submission_chunk; //!< don't mix less than this #
|
int submission_chunk; //!< don't mix less than this #
|
||||||
unsigned paintedtime; //!< sound clock in samples
|
unsigned paintedtime; //!< sound clock in samples
|
||||||
int framepos; //!< position of dma cursor
|
int framepos; //!< position of dma cursor
|
||||||
int threaded; //!< output runs in a thread
|
int threaded; //!< output+mixer run asynchronously
|
||||||
unsigned char *buffer; //!< destination for mixed sound
|
byte *buffer; //!< destination for mixed sound
|
||||||
/** Transfer mixed samples to the output.
|
/** Transfer mixed samples to the output.
|
||||||
\param paintbuffer The buffer of mixed samples to be transferred.
|
\param paintbuffer The buffer of mixed samples to be transferred.
|
||||||
\param count The number of sample to transfer.
|
\param count The number of sample to transfer.
|
||||||
\param volume The gain for the samples.
|
\param volume The gain for the samples.
|
||||||
*/
|
*/
|
||||||
void (*xfer) (struct snd_s *snd,
|
void (*xfer) (struct snd_s *snd, portable_samplepair_t *paintbuffer,
|
||||||
portable_samplepair_t *paintbuffer, int count,
|
int count, float volume);
|
||||||
float volume);
|
|
||||||
/** Optional data for the xfer function.
|
/** Optional data for the xfer function.
|
||||||
*/
|
*/
|
||||||
void *xfer_data;
|
void *xfer_data;
|
||||||
|
|
||||||
void (*finish_channels) (void);
|
void (*finish_channels) (void);
|
||||||
void (*paint_channels) (struct snd_s *snd, unsigned endtime);
|
void (*paint_channels) (struct snd_s *snd, unsigned endtime);
|
||||||
|
@ -163,14 +162,14 @@ struct sfxbuffer_s {
|
||||||
\param count number of frames to advance
|
\param count number of frames to advance
|
||||||
\return true for success, false if an error occured
|
\return true for success, false if an error occured
|
||||||
*/
|
*/
|
||||||
int (*advance) (sfxbuffer_t *buffer, unsigned int count);
|
int (*advance) (sfxbuffer_t *buffer, unsigned int count);
|
||||||
/** Seek to an absolute position within the stream, resetting the ring
|
/** Seek to an absolute position within the stream, resetting the ring
|
||||||
buffer.
|
buffer.
|
||||||
\param buffer "this"
|
\param buffer "this"
|
||||||
\param pos frame position with the stream
|
\param pos frame position with the stream
|
||||||
*/
|
*/
|
||||||
void (*setpos) (sfxbuffer_t *buffer, unsigned int pos);
|
void (*setpos) (sfxbuffer_t *buffer, unsigned int pos);
|
||||||
void (*close) (sfxbuffer_t *buffer);
|
void (*close) (sfxbuffer_t *buffer);
|
||||||
/** Sample data. The block at the beginning of the buffer (size depends on
|
/** Sample data. The block at the beginning of the buffer (size depends on
|
||||||
sample size)
|
sample size)
|
||||||
*/
|
*/
|
||||||
|
@ -196,12 +195,12 @@ struct sfxstream_s {
|
||||||
\param data address of pointer to be set to point to the buffer
|
\param data address of pointer to be set to point to the buffer
|
||||||
holding the samples
|
holding the samples
|
||||||
*/
|
*/
|
||||||
long (*ll_read)(void *cb_data, float **data);
|
long (*ll_read)(void *cb_data, float **data);
|
||||||
/** Seek to an absolute position within the stream (low level).
|
/** Seek to an absolute position within the stream (low level).
|
||||||
\param stream "this"
|
\param stream "this"
|
||||||
\param pos frame position with the stream
|
\param pos frame position with the stream
|
||||||
*/
|
*/
|
||||||
int (*ll_seek)(sfxstream_t *stream, int pos);
|
int (*ll_seek)(sfxstream_t *stream, int pos);
|
||||||
/** Read data from the stream.
|
/** Read data from the stream.
|
||||||
This is a high-level function for use in the mixer. The read samples
|
This is a high-level function for use in the mixer. The read samples
|
||||||
will always at be the correct sample rate for the mixer, reguardless
|
will always at be the correct sample rate for the mixer, reguardless
|
||||||
|
@ -211,12 +210,12 @@ struct sfxstream_s {
|
||||||
\param frames maximum number of frames to read from stream
|
\param frames maximum number of frames to read from stream
|
||||||
\return number of frames read from stream
|
\return number of frames read from stream
|
||||||
*/
|
*/
|
||||||
int (*read)(sfxstream_t *stream, float *data, int frames);
|
int (*read)(sfxstream_t *stream, float *data, int frames);
|
||||||
/** Seek to an absolute position within the stream.
|
/** Seek to an absolute position within the stream.
|
||||||
\param stream "this"
|
\param stream "this"
|
||||||
\param pos frame position with the stream
|
\param pos frame position with the stream
|
||||||
*/
|
*/
|
||||||
int (*seek)(sfxstream_t *stream, int pos);
|
int (*seek)(sfxstream_t *stream, int pos);
|
||||||
sfxbuffer_t *buffer; //<! stream's ring buffer
|
sfxbuffer_t *buffer; //<! stream's ring buffer
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue