mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-05 05:10:55 +00:00
Sound cleanup: remove some unused functions
git-svn-id: https://svn.eduke32.com/eduke32@5812 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
531814ecc4
commit
065db7d5e8
11 changed files with 20 additions and 711 deletions
|
@ -4369,7 +4369,7 @@ int32_t G_StartRTS(int32_t i, int localp)
|
||||||
|
|
||||||
if (sndptr != NULL)
|
if (sndptr != NULL)
|
||||||
{
|
{
|
||||||
FX_PlayAuto3D(sndptr, RTS_SoundLength(i-1), FX_ONESHOT, 0, 0, FX_VOLUME(1), 255, -i);
|
FX_Play3D(sndptr, RTS_SoundLength(i-1), FX_ONESHOT, 0, 0, FX_VOLUME(1), 255, -i);
|
||||||
g_RTSPlaying = 7;
|
g_RTSPlaying = 7;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,11 +77,11 @@ int32_t FX_SetPan(int32_t handle, int32_t vol, int32_t left, int32_t right);
|
||||||
int32_t FX_SetPitch(int32_t handle, int32_t pitchoffset);
|
int32_t FX_SetPitch(int32_t handle, int32_t pitchoffset);
|
||||||
int32_t FX_SetFrequency(int32_t handle, int32_t frequency);
|
int32_t FX_SetFrequency(int32_t handle, int32_t frequency);
|
||||||
|
|
||||||
int32_t FX_PlayAuto(char *ptr, uint32_t ptrlength, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right,
|
int32_t FX_Play(char *ptr, uint32_t ptrlength, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right,
|
||||||
int32_t priority, uint32_t callbackval);
|
int32_t priority, uint32_t callbackval);
|
||||||
int32_t FX_PlayLoopedAuto(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loopend, int32_t pitchoffset,
|
int32_t FX_PlayLooped(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loopend, int32_t pitchoffset,
|
||||||
int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
|
int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval);
|
||||||
int32_t FX_PlayAuto3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitchoffset, int32_t angle,
|
int32_t FX_Play3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitchoffset, int32_t angle,
|
||||||
int32_t distance, int32_t priority, uint32_t callbackval);
|
int32_t distance, int32_t priority, uint32_t callbackval);
|
||||||
|
|
||||||
int32_t FX_Pan3D(int32_t handle, int32_t angle, int32_t distance);
|
int32_t FX_Pan3D(int32_t handle, int32_t angle, int32_t distance);
|
||||||
|
@ -90,7 +90,6 @@ int32_t FX_SoundsPlaying(void);
|
||||||
int32_t FX_StopSound(int32_t handle);
|
int32_t FX_StopSound(int32_t handle);
|
||||||
int32_t FX_StopAllSounds(void);
|
int32_t FX_StopAllSounds(void);
|
||||||
|
|
||||||
int32_t FX_SetVoiceCallback(int32_t handle, uint32_t callbackval);
|
|
||||||
int32_t FX_SetPrintf(void(*function)(const char *, ...));
|
int32_t FX_SetPrintf(void(*function)(const char *, ...));
|
||||||
|
|
||||||
int32_t FX_GetPosition(int32_t handle, int32_t *position);
|
int32_t FX_GetPosition(int32_t handle, int32_t *position);
|
||||||
|
|
|
@ -41,13 +41,7 @@ enum MUSIC_ERRORS
|
||||||
MUSIC_Warning = -2,
|
MUSIC_Warning = -2,
|
||||||
MUSIC_Error = -1,
|
MUSIC_Error = -1,
|
||||||
MUSIC_Ok = 0,
|
MUSIC_Ok = 0,
|
||||||
MUSIC_ASSVersion,
|
|
||||||
MUSIC_SoundCardError,
|
|
||||||
MUSIC_MPU401Error,
|
|
||||||
MUSIC_InvalidCard,
|
|
||||||
MUSIC_MidiError,
|
MUSIC_MidiError,
|
||||||
MUSIC_TaskManError,
|
|
||||||
MUSIC_DPMI_Error
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -66,27 +60,12 @@ const char *MUSIC_ErrorString( int32_t ErrorNumber );
|
||||||
int32_t MUSIC_Init( int32_t SoundCard, int32_t Address );
|
int32_t MUSIC_Init( int32_t SoundCard, int32_t Address );
|
||||||
int32_t MUSIC_Shutdown( void );
|
int32_t MUSIC_Shutdown( void );
|
||||||
void MUSIC_SetVolume( int32_t volume );
|
void MUSIC_SetVolume( int32_t volume );
|
||||||
void MUSIC_SetMidiChannelVolume( int32_t channel, int32_t volume );
|
|
||||||
void MUSIC_ResetMidiChannelVolumes( void );
|
|
||||||
int32_t MUSIC_GetVolume( void );
|
int32_t MUSIC_GetVolume( void );
|
||||||
void MUSIC_SetLoopFlag( int32_t loopflag );
|
void MUSIC_SetLoopFlag( int32_t loopflag );
|
||||||
int32_t MUSIC_SongPlaying( void );
|
|
||||||
void MUSIC_Continue( void );
|
void MUSIC_Continue( void );
|
||||||
void MUSIC_Pause( void );
|
void MUSIC_Pause( void );
|
||||||
int32_t MUSIC_StopSong( void );
|
int32_t MUSIC_StopSong( void );
|
||||||
int32_t MUSIC_PlaySong( char *song, int32_t loopflag );
|
int32_t MUSIC_PlaySong( char *song, int32_t loopflag );
|
||||||
void MUSIC_SetContext( int32_t context );
|
|
||||||
int32_t MUSIC_GetContext( void );
|
|
||||||
void MUSIC_SetSongTick( uint32_t PositionInTicks );
|
|
||||||
void MUSIC_SetSongTime( uint32_t milliseconds );
|
|
||||||
void MUSIC_SetSongPosition( int32_t measure, int32_t beat, int32_t tick );
|
|
||||||
void MUSIC_GetSongPosition( songposition *pos );
|
|
||||||
void MUSIC_GetSongLength( songposition *pos );
|
|
||||||
int32_t MUSIC_FadeVolume( int32_t tovolume, int32_t milliseconds );
|
|
||||||
int32_t MUSIC_FadeActive( void );
|
|
||||||
void MUSIC_StopFade( void );
|
|
||||||
void MUSIC_RerouteMidiChannel( int32_t channel, int32_t ( *function )( int32_t, int32_t, int32_t ) );
|
|
||||||
void MUSIC_RegisterTimbreBank( char *timbres );
|
|
||||||
void MUSIC_Update(void);
|
void MUSIC_Update(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -226,13 +226,13 @@ static wavefmt_t FX_AutoDetectFormat(const char *ptr, uint32_t length)
|
||||||
return fmt;
|
return fmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t FX_PlayAuto(char *ptr, uint32_t length, int32_t pitchoffset, int32_t vol,
|
int32_t FX_Play(char *ptr, uint32_t length, int32_t pitchoffset, int32_t vol,
|
||||||
int32_t left, int32_t right, int32_t priority, uint32_t callbackval)
|
int32_t left, int32_t right, int32_t priority, uint32_t callbackval)
|
||||||
{
|
{
|
||||||
return FX_PlayLoopedAuto(ptr, length, -1, -1, pitchoffset, vol, left, right, priority, callbackval);
|
return FX_PlayLooped(ptr, length, -1, -1, pitchoffset, vol, left, right, priority, callbackval);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t FX_PlayLoopedAuto(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset,
|
int32_t FX_PlayLooped(char *ptr, uint32_t length, int32_t loopstart, int32_t loopend, int32_t pitchoffset,
|
||||||
int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval)
|
int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval)
|
||||||
{
|
{
|
||||||
int32_t handle = -1;
|
int32_t handle = -1;
|
||||||
|
@ -256,7 +256,7 @@ int32_t FX_PlayLoopedAuto(char *ptr, uint32_t length, int32_t loopstart, int32_t
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t FX_PlayAuto3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance,
|
int32_t FX_Play3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance,
|
||||||
int32_t priority, uint32_t callbackval)
|
int32_t priority, uint32_t callbackval)
|
||||||
{
|
{
|
||||||
int32_t handle = -1;
|
int32_t handle = -1;
|
||||||
|
@ -280,19 +280,6 @@ int32_t FX_PlayAuto3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitch
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t FX_SetVoiceCallback(int32_t handle, uint32_t callbackval)
|
|
||||||
{
|
|
||||||
int32_t status = MV_SetVoiceCallback(handle, callbackval);
|
|
||||||
|
|
||||||
if (status != MV_Ok)
|
|
||||||
{
|
|
||||||
FX_SetErrorCode(FX_MultiVocError);
|
|
||||||
return FX_Warning;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FX_Ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t FX_SetPrintf(void (*function)(const char *, ...))
|
int32_t FX_SetPrintf(void (*function)(const char *, ...))
|
||||||
{
|
{
|
||||||
MV_SetPrintf(function);
|
MV_SetPrintf(function);
|
||||||
|
|
|
@ -1026,20 +1026,6 @@ int32_t MV_Shutdown(void)
|
||||||
return MV_Ok;
|
return MV_Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t MV_SetVoiceCallback(int32_t handle, uint32_t callbackval)
|
|
||||||
{
|
|
||||||
VoiceNode *voice = MV_BeginService(handle);
|
|
||||||
|
|
||||||
if (voice == NULL)
|
|
||||||
return MV_Error;
|
|
||||||
|
|
||||||
voice->callbackval = callbackval;
|
|
||||||
|
|
||||||
MV_EndService();
|
|
||||||
|
|
||||||
return MV_Ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MV_SetPrintf(void (*function)(const char *, ...)) { MV_Printf = function; }
|
void MV_SetPrintf(void (*function)(const char *, ...)) { MV_Printf = function; }
|
||||||
|
|
||||||
const char *loopStartTags[loopStartTagCount] = { "LOOP_START", "LOOPSTART" };
|
const char *loopStartTags[loopStartTagCount] = { "LOOP_START", "LOOPSTART" };
|
||||||
|
|
|
@ -96,8 +96,6 @@ extern int32_t MV_ErrorCode;
|
||||||
|
|
||||||
enum MV_Errors
|
enum MV_Errors
|
||||||
{
|
{
|
||||||
MV_Warning = -2,
|
|
||||||
MV_Error = -1,
|
|
||||||
MV_Ok = 0,
|
MV_Ok = 0,
|
||||||
MV_NotInstalled,
|
MV_NotInstalled,
|
||||||
MV_DriverError,
|
MV_DriverError,
|
||||||
|
@ -164,7 +162,6 @@ int32_t MV_GetReverseStereo(void);
|
||||||
int32_t MV_Init(int32_t soundcard, int32_t MixRate, int32_t Voices, int32_t numchannels,
|
int32_t MV_Init(int32_t soundcard, int32_t MixRate, int32_t Voices, int32_t numchannels,
|
||||||
void *initdata);
|
void *initdata);
|
||||||
int32_t MV_Shutdown(void);
|
int32_t MV_Shutdown(void);
|
||||||
int32_t MV_SetVoiceCallback(int32_t handle, uint32_t callbackval);
|
|
||||||
void MV_SetPrintf(void (*function)(const char *fmt, ...));
|
void MV_SetPrintf(void (*function)(const char *fmt, ...));
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -727,27 +727,6 @@ static int32_t _MIDI_SendControlChange
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_RerouteMidiChannel
|
|
||||||
|
|
||||||
Sets callback function to reroute MIDI commands from specified
|
|
||||||
function.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MIDI_RerouteMidiChannel
|
|
||||||
(
|
|
||||||
int32_t channel,
|
|
||||||
int32_t(*function)(int32_t, int32_t, int32_t)
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
if ((channel >= 1) && (channel <= 16))
|
|
||||||
{
|
|
||||||
_MIDI_RerouteFunctions[ channel - 1 ] = function;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
Function: MIDI_AllNotesOff
|
Function: MIDI_AllNotesOff
|
||||||
|
|
||||||
|
@ -1014,40 +993,6 @@ int32_t MIDI_GetVolume
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_SetContext
|
|
||||||
|
|
||||||
Sets the song context.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MIDI_SetContext
|
|
||||||
(
|
|
||||||
int32_t context
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
if ((context > 0) && (context < EMIDI_NUM_CONTEXTS))
|
|
||||||
{
|
|
||||||
_MIDI_Context = context;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_GetContext
|
|
||||||
|
|
||||||
Returns the current song context.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
int32_t MIDI_GetContext
|
|
||||||
(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
return _MIDI_Context;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
Function: MIDI_SetLoopFlag
|
Function: MIDI_SetLoopFlag
|
||||||
|
@ -1106,22 +1051,6 @@ void MIDI_PauseSong
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_SongPlaying
|
|
||||||
|
|
||||||
Returns whether a song is playing or not.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
int32_t MIDI_SongPlaying
|
|
||||||
(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
return _MIDI_SongActive;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
Function: MIDI_SetMidiFuncs
|
Function: MIDI_SetMidiFuncs
|
||||||
|
|
||||||
|
@ -1491,212 +1420,6 @@ static int32_t _MIDI_ProcessNextTick
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_SetSongTick
|
|
||||||
|
|
||||||
Sets the position of the song pointer.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MIDI_SetSongTick
|
|
||||||
(
|
|
||||||
uint32_t PositionInTicks
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
if (!_MIDI_SongLoaded)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MIDI_PauseSong();
|
|
||||||
|
|
||||||
if (PositionInTicks < _MIDI_PositionInTicks)
|
|
||||||
{
|
|
||||||
_MIDI_ResetTracks();
|
|
||||||
MIDI_Reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
while (_MIDI_PositionInTicks < PositionInTicks)
|
|
||||||
{
|
|
||||||
if (_MIDI_ProcessNextTick())
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (_MIDI_ActiveTracks == 0)
|
|
||||||
{
|
|
||||||
_MIDI_ResetTracks();
|
|
||||||
if (!_MIDI_Loop)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MIDI_SetVolume(_MIDI_TotalVolume);
|
|
||||||
MIDI_ContinueSong();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_SetSongTime
|
|
||||||
|
|
||||||
Sets the position of the song pointer.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MIDI_SetSongTime
|
|
||||||
(
|
|
||||||
uint32_t milliseconds
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
uint32_t mil;
|
|
||||||
uint32_t sec;
|
|
||||||
uint32_t newtime;
|
|
||||||
|
|
||||||
if (!_MIDI_SongLoaded)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MIDI_PauseSong();
|
|
||||||
|
|
||||||
mil = tabledivide32_noinline((milliseconds % 1000) << TIME_PRECISION, 1000);
|
|
||||||
sec = tabledivide32_noinline(milliseconds, 1000) << TIME_PRECISION;
|
|
||||||
newtime = sec + mil;
|
|
||||||
|
|
||||||
if (newtime < _MIDI_Time)
|
|
||||||
{
|
|
||||||
_MIDI_ResetTracks();
|
|
||||||
MIDI_Reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
while (_MIDI_Time < newtime)
|
|
||||||
{
|
|
||||||
if (_MIDI_ProcessNextTick())
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (_MIDI_ActiveTracks == 0)
|
|
||||||
{
|
|
||||||
_MIDI_ResetTracks();
|
|
||||||
if (!_MIDI_Loop)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MIDI_SetVolume(_MIDI_TotalVolume);
|
|
||||||
MIDI_ContinueSong();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_SetSongPosition
|
|
||||||
|
|
||||||
Sets the position of the song pointer.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MIDI_SetSongPosition
|
|
||||||
(
|
|
||||||
int32_t measure,
|
|
||||||
int32_t beat,
|
|
||||||
int32_t tick
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
uint32_t pos;
|
|
||||||
|
|
||||||
if (!_MIDI_SongLoaded)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MIDI_PauseSong();
|
|
||||||
|
|
||||||
pos = RELATIVE_BEAT(measure, beat, tick);
|
|
||||||
|
|
||||||
if (pos < (uint32_t)RELATIVE_BEAT(_MIDI_Measure, _MIDI_Beat, _MIDI_Tick))
|
|
||||||
{
|
|
||||||
_MIDI_ResetTracks();
|
|
||||||
MIDI_Reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
while ((uint32_t)RELATIVE_BEAT(_MIDI_Measure, _MIDI_Beat, _MIDI_Tick) < pos)
|
|
||||||
{
|
|
||||||
if (_MIDI_ProcessNextTick())
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (_MIDI_ActiveTracks == 0)
|
|
||||||
{
|
|
||||||
_MIDI_ResetTracks();
|
|
||||||
if (!_MIDI_Loop)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MIDI_SetVolume(_MIDI_TotalVolume);
|
|
||||||
MIDI_ContinueSong();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_GetSongPosition
|
|
||||||
|
|
||||||
Returns the position of the song pointer in Measures, beats, ticks.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MIDI_GetSongPosition
|
|
||||||
(
|
|
||||||
songposition *pos
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
uint32_t mil;
|
|
||||||
uint32_t sec;
|
|
||||||
|
|
||||||
mil = (_MIDI_Time & ((1 << TIME_PRECISION) - 1)) * 1000;
|
|
||||||
sec = _MIDI_Time >> TIME_PRECISION;
|
|
||||||
pos->milliseconds = (mil >> TIME_PRECISION) + (sec * 1000);
|
|
||||||
pos->tickposition = _MIDI_PositionInTicks;
|
|
||||||
pos->measure = _MIDI_Measure;
|
|
||||||
pos->beat = _MIDI_Beat;
|
|
||||||
pos->tick = _MIDI_Tick;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MIDI_GetSongLength
|
|
||||||
|
|
||||||
Returns the length of the song.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MIDI_GetSongLength
|
|
||||||
(
|
|
||||||
songposition *pos
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
uint32_t mil;
|
|
||||||
uint32_t sec;
|
|
||||||
|
|
||||||
mil = (_MIDI_TotalTime & ((1 << TIME_PRECISION) - 1)) * 1000;
|
|
||||||
sec = _MIDI_TotalTime >> TIME_PRECISION;
|
|
||||||
|
|
||||||
pos->milliseconds = (mil >> TIME_PRECISION) + (sec * 1000);
|
|
||||||
pos->measure = _MIDI_TotalMeasures;
|
|
||||||
pos->beat = _MIDI_TotalBeats;
|
|
||||||
pos->tick = _MIDI_TotalTicks;
|
|
||||||
pos->tickposition = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
Function: MIDI_InitEMIDI
|
Function: MIDI_InitEMIDI
|
||||||
|
|
||||||
|
|
|
@ -87,33 +87,10 @@ const char *MUSIC_ErrorString
|
||||||
ErrorString = "Music ok.";
|
ErrorString = "Music ok.";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MUSIC_ASSVersion :
|
|
||||||
ErrorString = "Apogee Sound System Version WinMM "
|
|
||||||
"Programmed by Jim Dose, Ported by Jonathon Fowler\n"
|
|
||||||
"(c) Copyright 1996 James R. Dose. All Rights Reserved.\n";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_SoundCardError :
|
|
||||||
case MUSIC_MPU401Error :
|
|
||||||
ErrorString = "Could not detect MPU-401.";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_InvalidCard :
|
|
||||||
ErrorString = "Invalid Music device.";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_MidiError :
|
case MUSIC_MidiError :
|
||||||
ErrorString = "Error playing MIDI file.";
|
ErrorString = "Error playing MIDI file.";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MUSIC_TaskManError :
|
|
||||||
ErrorString = "TaskMan error.";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_DPMI_Error :
|
|
||||||
ErrorString = "DPMI Error in MUSIC.";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default :
|
default :
|
||||||
ErrorString = "Unknown Music error code.";
|
ErrorString = "Unknown Music error code.";
|
||||||
break;
|
break;
|
||||||
|
@ -197,38 +174,6 @@ void MUSIC_SetVolume
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_SetMidiChannelVolume
|
|
||||||
|
|
||||||
Sets the volume of music playback on the specified MIDI channel.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_SetMidiChannelVolume
|
|
||||||
(
|
|
||||||
int32_t channel,
|
|
||||||
int32_t volume
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_SetUserChannelVolume(channel, volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_ResetMidiChannelVolumes
|
|
||||||
|
|
||||||
Sets the volume of music playback on all MIDI channels to full volume.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_ResetMidiChannelVolumes
|
|
||||||
(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_ResetUserChannelVolume();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
Function: MUSIC_GetVolume
|
Function: MUSIC_GetVolume
|
||||||
|
@ -267,22 +212,6 @@ void MUSIC_SetLoopFlag
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_SongPlaying
|
|
||||||
|
|
||||||
Returns whether there is a song playing.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
int32_t MUSIC_SongPlaying
|
|
||||||
(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
return MIDI_SongPlaying();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
/*---------------------------------------------------------------------
|
||||||
Function: MUSIC_Continue
|
Function: MUSIC_Continue
|
||||||
|
|
||||||
|
@ -327,7 +256,6 @@ int32_t MUSIC_StopSong
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
MUSIC_StopFade();
|
|
||||||
MIDI_StopSong();
|
MIDI_StopSong();
|
||||||
MUSIC_SetErrorCode(MUSIC_Ok);
|
MUSIC_SetErrorCode(MUSIC_Ok);
|
||||||
return MUSIC_Ok;
|
return MUSIC_Ok;
|
||||||
|
@ -363,120 +291,6 @@ int32_t MUSIC_PlaySong
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_SetContext
|
|
||||||
|
|
||||||
Sets the song context.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_SetContext
|
|
||||||
(
|
|
||||||
int32_t context
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_SetContext(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_GetContext
|
|
||||||
|
|
||||||
Returns the current song context.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
int32_t MUSIC_GetContext
|
|
||||||
(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
return MIDI_GetContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_SetSongTick
|
|
||||||
|
|
||||||
Sets the position of the song pointer.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_SetSongTick
|
|
||||||
(
|
|
||||||
uint32_t PositionInTicks
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_SetSongTick(PositionInTicks);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_SetSongTime
|
|
||||||
|
|
||||||
Sets the position of the song pointer.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_SetSongTime
|
|
||||||
(
|
|
||||||
uint32_t milliseconds
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_SetSongTime(milliseconds);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_SetSongPosition
|
|
||||||
|
|
||||||
Sets the position of the song pointer.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_SetSongPosition
|
|
||||||
(
|
|
||||||
int32_t measure,
|
|
||||||
int32_t beat,
|
|
||||||
int32_t tick
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_SetSongPosition(measure, beat, tick);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_GetSongPosition
|
|
||||||
|
|
||||||
Returns the position of the song pointer.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_GetSongPosition
|
|
||||||
(
|
|
||||||
songposition *pos
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_GetSongPosition(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_GetSongLength
|
|
||||||
|
|
||||||
Returns the length of the song.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_GetSongLength
|
|
||||||
(
|
|
||||||
songposition *pos
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_GetSongLength(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t MUSIC_InitMidi
|
int32_t MUSIC_InitMidi
|
||||||
(
|
(
|
||||||
int32_t card,
|
int32_t card,
|
||||||
|
@ -505,88 +319,6 @@ int32_t MUSIC_InitMidi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_FadeVolume
|
|
||||||
|
|
||||||
Fades music volume from current level to another over a specified
|
|
||||||
period of time.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
int32_t MUSIC_FadeVolume
|
|
||||||
(
|
|
||||||
int32_t tovolume,
|
|
||||||
int32_t milliseconds
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(milliseconds);
|
|
||||||
MIDI_SetVolume(tovolume);
|
|
||||||
return MUSIC_Ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_FadeActive
|
|
||||||
|
|
||||||
Returns whether the fade routine is active.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
int32_t MUSIC_FadeActive
|
|
||||||
(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_StopFade
|
|
||||||
|
|
||||||
Stops fading the music.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_StopFade
|
|
||||||
(
|
|
||||||
void
|
|
||||||
)
|
|
||||||
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_RerouteMidiChannel
|
|
||||||
|
|
||||||
Sets callback function to reroute MIDI commands from specified
|
|
||||||
function.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_RerouteMidiChannel
|
|
||||||
(
|
|
||||||
int32_t channel,
|
|
||||||
int32_t(*function)(int32_t, int32_t, int32_t)
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
MIDI_RerouteMidiChannel(channel, function);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------
|
|
||||||
Function: MUSIC_RegisterTimbreBank
|
|
||||||
|
|
||||||
Halts playback of all sounds.
|
|
||||||
---------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
void MUSIC_RegisterTimbreBank
|
|
||||||
(
|
|
||||||
char *timbres
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(timbres);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_Update(void)
|
void MUSIC_Update(void)
|
||||||
|
|
|
@ -299,18 +299,6 @@ void MUSIC_SetVolume(int32_t volume)
|
||||||
} // MUSIC_SetVolume
|
} // MUSIC_SetVolume
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_SetMidiChannelVolume(int32_t channel, int32_t volume)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(channel);
|
|
||||||
UNREFERENCED_PARAMETER(volume);
|
|
||||||
} // MUSIC_SetMidiChannelVolume
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_ResetMidiChannelVolumes(void)
|
|
||||||
{
|
|
||||||
} // MUSIC_ResetMidiChannelVolumes
|
|
||||||
|
|
||||||
|
|
||||||
int32_t MUSIC_GetVolume(void)
|
int32_t MUSIC_GetVolume(void)
|
||||||
{
|
{
|
||||||
return (Mix_VolumeMusic(-1) << 1); // convert 0-128 to 0-255.
|
return (Mix_VolumeMusic(-1) << 1); // convert 0-128 to 0-255.
|
||||||
|
@ -323,12 +311,6 @@ void MUSIC_SetLoopFlag(int32_t loopflag)
|
||||||
} // MUSIC_SetLoopFlag
|
} // MUSIC_SetLoopFlag
|
||||||
|
|
||||||
|
|
||||||
int32_t MUSIC_SongPlaying(void)
|
|
||||||
{
|
|
||||||
return ((Mix_PlayingMusic()) ? TRUE : FALSE);
|
|
||||||
} // MUSIC_SongPlaying
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_Continue(void)
|
void MUSIC_Continue(void)
|
||||||
{
|
{
|
||||||
if (Mix_PausedMusic())
|
if (Mix_PausedMusic())
|
||||||
|
@ -505,81 +487,5 @@ int32_t MUSIC_PlaySong(char *song, int32_t loopflag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_SetContext(int32_t context)
|
|
||||||
{
|
|
||||||
music_context = context;
|
|
||||||
} // MUSIC_SetContext
|
|
||||||
|
|
||||||
|
|
||||||
int32_t MUSIC_GetContext(void)
|
|
||||||
{
|
|
||||||
return music_context;
|
|
||||||
} // MUSIC_GetContext
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_SetSongTick(uint32_t PositionInTicks)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(PositionInTicks);
|
|
||||||
} // MUSIC_SetSongTick
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_SetSongTime(uint32_t milliseconds)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(milliseconds);
|
|
||||||
}// MUSIC_SetSongTime
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_SetSongPosition(int32_t measure, int32_t beat, int32_t tick)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(measure);
|
|
||||||
UNREFERENCED_PARAMETER(beat);
|
|
||||||
UNREFERENCED_PARAMETER(tick);
|
|
||||||
} // MUSIC_SetSongPosition
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_GetSongPosition(songposition *pos)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(pos);
|
|
||||||
} // MUSIC_GetSongPosition
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_GetSongLength(songposition *pos)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(pos);
|
|
||||||
} // MUSIC_GetSongLength
|
|
||||||
|
|
||||||
|
|
||||||
int32_t MUSIC_FadeVolume(int32_t tovolume, int32_t milliseconds)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(tovolume);
|
|
||||||
Mix_FadeOutMusic(milliseconds);
|
|
||||||
return MUSIC_Ok;
|
|
||||||
} // MUSIC_FadeVolume
|
|
||||||
|
|
||||||
|
|
||||||
int32_t MUSIC_FadeActive(void)
|
|
||||||
{
|
|
||||||
return ((Mix_FadingMusic() == MIX_FADING_OUT) ? TRUE : FALSE);
|
|
||||||
} // MUSIC_FadeActive
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_StopFade(void)
|
|
||||||
{
|
|
||||||
} // MUSIC_StopFade
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_RerouteMidiChannel(int32_t channel, int32_t (*function)(int32_t, int32_t, int32_t))
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(channel);
|
|
||||||
UNREFERENCED_PARAMETER(function);
|
|
||||||
} // MUSIC_RerouteMidiChannel
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_RegisterTimbreBank(char *timbres)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(timbres);
|
|
||||||
} // MUSIC_RegisterTimbreBank
|
|
||||||
|
|
||||||
|
|
||||||
void MUSIC_Update(void)
|
void MUSIC_Update(void)
|
||||||
{}
|
{}
|
||||||
|
|
|
@ -235,7 +235,7 @@ int32_t S_PlayMusic(const char *fn)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int32_t const mvol = MASTER_VOLUME(ud.config.MusicVolume);
|
int32_t const mvol = MASTER_VOLUME(ud.config.MusicVolume);
|
||||||
MusicVoice = FX_PlayLoopedAuto(MusicPtr, MusicLen, 0, 0,
|
MusicVoice = FX_PlayLooped(MusicPtr, MusicLen, 0, 0,
|
||||||
0, mvol, mvol, mvol,
|
0, mvol, mvol, mvol,
|
||||||
FX_MUSIC_PRIORITY, MUSIC_ID);
|
FX_MUSIC_PRIORITY, MUSIC_ID);
|
||||||
if (MusicVoice > FX_Ok)
|
if (MusicVoice > FX_Ok)
|
||||||
|
@ -630,14 +630,14 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
||||||
|
|
||||||
if (repeatp && !ambsfxp)
|
if (repeatp && !ambsfxp)
|
||||||
{
|
{
|
||||||
voice = FX_PlayLoopedAuto(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
voice = FX_PlayLooped(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
||||||
pitch, FX_VOLUME(sndist>>6), FX_VOLUME(sndist>>6), 0, // XXX: why is 'right' 0?
|
pitch, FX_VOLUME(sndist>>6), FX_VOLUME(sndist>>6), 0, // XXX: why is 'right' 0?
|
||||||
g_sounds[num].pr, (num * MAXSOUNDINSTANCES) + j);
|
g_sounds[num].pr, (num * MAXSOUNDINSTANCES) + j);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Ambient MUSICANDSFX always start playing using the 3D routines!
|
// Ambient MUSICANDSFX always start playing using the 3D routines!
|
||||||
voice = FX_PlayAuto3D(g_sounds[num].ptr, g_sounds[num].soundsiz,
|
voice = FX_Play3D(g_sounds[num].ptr, g_sounds[num].soundsiz,
|
||||||
repeatp ? FX_LOOP : FX_ONESHOT,
|
repeatp ? FX_LOOP : FX_ONESHOT,
|
||||||
pitch, sndang>>4, FX_VOLUME(sndist>>6),
|
pitch, sndang>>4, FX_VOLUME(sndist>>6),
|
||||||
g_sounds[num].pr, (num * MAXSOUNDINSTANCES) + j);
|
g_sounds[num].pr, (num * MAXSOUNDINSTANCES) + j);
|
||||||
|
@ -703,11 +703,11 @@ int32_t S_PlaySound(int32_t num)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_sounds[num].m & SF_LOOP)
|
if (g_sounds[num].m & SF_LOOP)
|
||||||
voice = FX_PlayLoopedAuto(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
voice = FX_PlayLooped(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
||||||
pitch,FX_VOLUME(LOUDESTVOLUME), FX_VOLUME(LOUDESTVOLUME), FX_VOLUME(LOUDESTVOLUME),
|
pitch,FX_VOLUME(LOUDESTVOLUME), FX_VOLUME(LOUDESTVOLUME), FX_VOLUME(LOUDESTVOLUME),
|
||||||
g_sounds[num].soundsiz, (num * MAXSOUNDINSTANCES) + j);
|
g_sounds[num].soundsiz, (num * MAXSOUNDINSTANCES) + j);
|
||||||
else
|
else
|
||||||
voice = FX_PlayAuto3D(g_sounds[num].ptr, g_sounds[num].soundsiz, FX_ONESHOT,
|
voice = FX_Play3D(g_sounds[num].ptr, g_sounds[num].soundsiz, FX_ONESHOT,
|
||||||
pitch, 0, FX_VOLUME(255-LOUDESTVOLUME),
|
pitch, 0, FX_VOLUME(255-LOUDESTVOLUME),
|
||||||
g_sounds[num].pr, (num * MAXSOUNDINSTANCES) + j);
|
g_sounds[num].pr, (num * MAXSOUNDINSTANCES) + j);
|
||||||
|
|
||||||
|
|
|
@ -260,12 +260,12 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos)
|
||||||
if (g_sounds[num].num > 0)
|
if (g_sounds[num].num > 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
voice = FX_PlayLoopedAuto(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
voice = FX_PlayLooped(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
||||||
pitch, sndist>>6, sndist>>6, 0, g_sounds[num].pr, num);
|
pitch, sndist>>6, sndist>>6, 0, g_sounds[num].pr, num);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
voice = FX_PlayAuto3D(g_sounds[num].ptr, g_sounds[num].soundsiz, FX_ONESHOT,
|
voice = FX_Play3D(g_sounds[num].ptr, g_sounds[num].soundsiz, FX_ONESHOT,
|
||||||
pitch, sndang>>4, sndist>>6, g_sounds[num].pr, num);
|
pitch, sndang>>4, sndist>>6, g_sounds[num].pr, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,12 +319,12 @@ void S_PlaySound(int32_t num)
|
||||||
|
|
||||||
if (g_sounds[num].m & SF_LOOP)
|
if (g_sounds[num].m & SF_LOOP)
|
||||||
{
|
{
|
||||||
voice = FX_PlayLoopedAuto(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
voice = FX_PlayLooped(g_sounds[num].ptr, g_sounds[num].soundsiz, 0, -1,
|
||||||
pitch,LOUDESTVOLUME,LOUDESTVOLUME,LOUDESTVOLUME,g_sounds[num].soundsiz,num);
|
pitch,LOUDESTVOLUME,LOUDESTVOLUME,LOUDESTVOLUME,g_sounds[num].soundsiz,num);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
voice = FX_PlayAuto3D(g_sounds[num].ptr, g_sounds[num].soundsiz, FX_ONESHOT,
|
voice = FX_Play3D(g_sounds[num].ptr, g_sounds[num].soundsiz, FX_ONESHOT,
|
||||||
pitch,0,255-LOUDESTVOLUME,g_sounds[num].pr, num);
|
pitch,0,255-LOUDESTVOLUME,g_sounds[num].pr, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue