Minor cleanups to snd_vorbis.c

- Remove any forward declarations
- Tightens checks for SDL
This commit is contained in:
Yamagi Burmeister 2013-04-21 11:27:31 +02:00
parent 78ce1e491c
commit fb7b97d868
2 changed files with 19 additions and 14 deletions

View File

@ -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 */

View File

@ -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;
@ -664,6 +660,8 @@ OGG_Stream(void)
}
else /* using SDL */
#endif
{
if (sound_started == SS_SDL)
{
/* Read that number samples into the buffer, that
were played since the last call to this function.
@ -673,6 +671,7 @@ OGG_Stream(void)
{
OGG_Read();
}
}
} /* using SDL */
} /* ogg_status == PLAY */
}