* remove assert in sound code (iSample != SAMPLE_NOT_ALLOCATED), this assertion is triggered much too oftenly, probably because we request OpenAl sources but never release them anymore, which is the result from depending too much on client code to be nice and tell the soundlib to release it

* remove a senseless forward declaration

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1541 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-04-26 17:51:17 +00:00
parent b51409ce3b
commit d86f1dd046
2 changed files with 2 additions and 10 deletions

View File

@ -319,7 +319,6 @@ BOOL sound_Play3DTrack( AUDIO_SAMPLE *psSample )
void sound_StopTrack( AUDIO_SAMPLE *psSample )
{
ASSERT( psSample != NULL, "sound_StopTrack: sample pointer invalid\n" );
ASSERT( psSample->iSample != (ALuint)SAMPLE_NOT_ALLOCATED, "sound_StopTrack: sample %u out of range", psSample->iSample );
if ( psSample->iSample != (ALuint)SAMPLE_NOT_ALLOCATED )
{
@ -327,7 +326,7 @@ void sound_StopTrack( AUDIO_SAMPLE *psSample )
}
else
{
debug( LOG_SOUND, "sound_StopTrack: sample %u out of range\n", psSample->iSample );
debug( LOG_SOUND, "sound_StopTrack: sample %u out of range, we probably have run out of available OpenAL sources\n", psSample->iSample );
}
// do stopped callback
@ -356,7 +355,6 @@ void sound_PauseTrack( AUDIO_SAMPLE *psSample )
void sound_FinishedCallback( AUDIO_SAMPLE *psSample )
{
ASSERT( psSample != NULL, "sound_FinishedCallback: sample pointer invalid\n" );
ASSERT( psSample->iSample != (ALuint)SAMPLE_NOT_ALLOCATED, "sound_FinishedCallback: sample %u out of range", psSample->iSample );
if ( g_apTrack[psSample->iTrack] != NULL )
{

View File

@ -53,12 +53,6 @@
/* enums */
/***************************************************************************/
/* forward definitions
*/
struct AUDIO_SAMPLE;
/***************************************************************************/
/* typedefs
*/
@ -70,7 +64,7 @@ typedef BOOL (* AUDIO_CALLBACK) ( void *psObj );
typedef struct AUDIO_SAMPLE
{
SDWORD iTrack;
SDWORD iTrack; // ID number identifying a specific sound; currently (r1182) mapped in audio_id.c
ALuint iSample; // OpenAL name of the sound source
SDWORD x, y, z;
BOOL bFinishedPlaying;