2007-01-15 12:09:25 -08:00
|
|
|
/*
|
|
|
|
This file is part of Warzone 2100.
|
|
|
|
Copyright (C) 1999-2004 Eidos Interactive
|
|
|
|
Copyright (C) 2005-2007 Warzone Resurrection Project
|
|
|
|
|
|
|
|
Warzone 2100 is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Warzone 2100 is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Warzone 2100; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2008-02-01 12:43:11 -08:00
|
|
|
/** \file
|
|
|
|
* Library-specific sound library functions;
|
|
|
|
* these need to be re-written for each library.
|
2007-06-28 10:47:08 -07:00
|
|
|
*/
|
|
|
|
|
2008-02-01 12:43:11 -08:00
|
|
|
#ifndef __INCLUDED_LIB_SOUND_TRACKLIB_H__
|
|
|
|
#define __INCLUDED_LIB_SOUND_TRACKLIB_H__
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
#include "track.h"
|
|
|
|
|
2008-02-01 12:43:11 -08:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
BOOL sound_InitLibrary( void );
|
|
|
|
void sound_ShutdownLibrary( void );
|
|
|
|
|
|
|
|
void sound_FreeTrack( TRACK * psTrack );
|
|
|
|
|
|
|
|
BOOL sound_Play2DSample( TRACK * psTrack, AUDIO_SAMPLE * psSample,
|
|
|
|
BOOL bQueued );
|
|
|
|
BOOL sound_Play3DSample( TRACK * psTrack, AUDIO_SAMPLE * psSample );
|
2007-12-13 15:16:03 -08:00
|
|
|
void sound_StopSample(AUDIO_SAMPLE* psSample);
|
2007-06-28 10:47:08 -07:00
|
|
|
void sound_PauseSample( AUDIO_SAMPLE * psSample );
|
|
|
|
void sound_ResumeSample( AUDIO_SAMPLE * psSample );
|
|
|
|
|
2008-01-27 13:28:35 -08:00
|
|
|
AUDIO_STREAM* sound_PlayStream(PHYSFS_file* PHYSFS_fileHandle, float volume, void (*onFinished)(void*), void* user_data);
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
void sound_SetSampleFreq( AUDIO_SAMPLE * psSample, SDWORD iFreq );
|
|
|
|
void sound_SetSampleVol( AUDIO_SAMPLE * psSample, SDWORD iVol,
|
|
|
|
BOOL bScale3D );
|
|
|
|
|
|
|
|
int sound_GetNumSamples( void );
|
|
|
|
BOOL sound_SampleIsFinished( AUDIO_SAMPLE * psSample );
|
|
|
|
BOOL sound_QueueSamplePlaying( void );
|
|
|
|
|
|
|
|
void sound_SetPlayerPos( SDWORD iX, SDWORD iY, SDWORD iZ );
|
2008-04-20 10:17:50 -07:00
|
|
|
void sound_SetPlayerOrientation(float x, float y, float z);
|
2007-12-31 07:16:59 -08:00
|
|
|
void sound_SetObjectPosition( AUDIO_SAMPLE *psSample );
|
|
|
|
|
2007-06-28 10:47:08 -07:00
|
|
|
void * sound_GetObject( SDWORD iSample );
|
|
|
|
void sound_SetObject( SDWORD iSample, void *pObj );
|
|
|
|
|
|
|
|
void sound_SetCallback( SDWORD iSample, AUDIO_CALLBACK pCallBack );
|
|
|
|
|
|
|
|
void sound_PauseAll( void );
|
|
|
|
void sound_ResumeAll( void );
|
|
|
|
void sound_StopAll( void );
|
|
|
|
void sound_Update( void );
|
2007-12-19 12:17:54 -08:00
|
|
|
unsigned int sound_GetActiveSamplesCount(void);
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
UDWORD sound_GetGameTime( void );
|
|
|
|
|
2008-02-01 12:43:11 -08:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2007-06-28 10:47:08 -07:00
|
|
|
|
2008-02-01 12:43:11 -08:00
|
|
|
#endif // __INCLUDED_LIB_SOUND_TRACKLIB_H__
|