mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Minor cleanups to snd_vorbis.c
- Remove any forward declarations - Tightens checks for SDL
This commit is contained in:
parent
78ce1e491c
commit
fb7b97d868
2 changed files with 19 additions and 14 deletions
|
@ -329,6 +329,12 @@ void AL_Update(void);
|
|||
void AL_RawSamples(int samples, int rate, int width,
|
||||
int channels, byte *data, float volume);
|
||||
|
||||
/*
|
||||
* Unqueues any raw samples
|
||||
* still in flight
|
||||
*/
|
||||
void AL_UnqueueRawSamples();
|
||||
|
||||
#endif /* USE_OPENAL */
|
||||
#endif /* CL_SOUND_LOCAL_H */
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
* This file implements an interface to libvorbis for decoding
|
||||
* OGG/Vorbis files. Strongly spoken this file isn't part of the sound
|
||||
* system but part of the main client. It justs converts Vorbis streams
|
||||
* into normal, raw Wave stream which are injected into snd_mem.c as if
|
||||
* they were normal wave files. At this moment only background music
|
||||
* playback and in theory .cin movie file playback is supported.
|
||||
* into normal, raw Wave stream which are injected into the backends as
|
||||
* if they were normal "raw" samples. At this moment only background
|
||||
* music playback and in theory .cin movie file playback is supported.
|
||||
*
|
||||
* =======================================================================
|
||||
*/
|
||||
|
@ -39,10 +39,6 @@
|
|||
#include "header/local.h"
|
||||
#include "header/vorbis.h"
|
||||
|
||||
#ifdef USE_OPENAL
|
||||
void AL_UnqueueRawSamples();
|
||||
#endif
|
||||
|
||||
qboolean ogg_first_init = true; /* First initialization flag. */
|
||||
qboolean ogg_started = false; /* Initialization flag. */
|
||||
int ogg_bigendian = 0;
|
||||
|
@ -60,7 +56,7 @@ cvar_t *ogg_sequence; /* Sequence play indicator. */
|
|||
cvar_t *ogg_volume; /* Music volume. */
|
||||
OggVorbis_File ovFile; /* Ogg Vorbis file. */
|
||||
vorbis_info *ogg_info; /* Ogg Vorbis file information */
|
||||
int ogg_numbufs; /* Number of buffers for OpenAL */
|
||||
int ogg_numbufs; /* Number of buffers for OpenAL */
|
||||
|
||||
/*
|
||||
* Initialize the Ogg Vorbis subsystem.
|
||||
|
@ -665,13 +661,16 @@ OGG_Stream(void)
|
|||
else /* using SDL */
|
||||
#endif
|
||||
{
|
||||
/* Read that number samples into the buffer, that
|
||||
were played since the last call to this function.
|
||||
This keeps the buffer at all times at an "optimal"
|
||||
fill level. */
|
||||
while (paintedtime + MAX_RAW_SAMPLES - 2048 > s_rawend)
|
||||
if (sound_started == SS_SDL)
|
||||
{
|
||||
OGG_Read();
|
||||
/* Read that number samples into the buffer, that
|
||||
were played since the last call to this function.
|
||||
This keeps the buffer at all times at an "optimal"
|
||||
fill level. */
|
||||
while (paintedtime + MAX_RAW_SAMPLES - 2048 > s_rawend)
|
||||
{
|
||||
OGG_Read();
|
||||
}
|
||||
}
|
||||
} /* using SDL */
|
||||
} /* ogg_status == PLAY */
|
||||
|
|
Loading…
Reference in a new issue