diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 974824677..3665c8ecc 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -4369,7 +4369,7 @@ int32_t G_StartRTS(int32_t i, int localp) 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; return 1; } diff --git a/polymer/eduke32/source/jaudiolib/include/fx_man.h b/polymer/eduke32/source/jaudiolib/include/fx_man.h index 7749e350f..a254255bd 100644 --- a/polymer/eduke32/source/jaudiolib/include/fx_man.h +++ b/polymer/eduke32/source/jaudiolib/include/fx_man.h @@ -77,12 +77,12 @@ 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_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 priority, uint32_t callbackval); -int32_t FX_PlayLoopedAuto(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 FX_PlayAuto3D(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 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 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 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 FX_Pan3D(int32_t handle, int32_t angle, int32_t distance); int32_t FX_SoundActive(int32_t handle); @@ -90,7 +90,6 @@ int32_t FX_SoundsPlaying(void); int32_t FX_StopSound(int32_t handle); 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_GetPosition(int32_t handle, int32_t *position); diff --git a/polymer/eduke32/source/jaudiolib/include/music.h b/polymer/eduke32/source/jaudiolib/include/music.h index 8671185c1..02263642d 100644 --- a/polymer/eduke32/source/jaudiolib/include/music.h +++ b/polymer/eduke32/source/jaudiolib/include/music.h @@ -41,13 +41,7 @@ enum MUSIC_ERRORS MUSIC_Warning = -2, MUSIC_Error = -1, MUSIC_Ok = 0, - MUSIC_ASSVersion, - MUSIC_SoundCardError, - MUSIC_MPU401Error, - MUSIC_InvalidCard, MUSIC_MidiError, - MUSIC_TaskManError, - MUSIC_DPMI_Error }; 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_Shutdown( void ); void MUSIC_SetVolume( int32_t volume ); -void MUSIC_SetMidiChannelVolume( int32_t channel, int32_t volume ); -void MUSIC_ResetMidiChannelVolumes( void ); int32_t MUSIC_GetVolume( void ); void MUSIC_SetLoopFlag( int32_t loopflag ); -int32_t MUSIC_SongPlaying( void ); void MUSIC_Continue( void ); void MUSIC_Pause( void ); int32_t MUSIC_StopSong( void ); 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); #endif diff --git a/polymer/eduke32/source/jaudiolib/src/fx_man.c b/polymer/eduke32/source/jaudiolib/src/fx_man.c index eb7701133..90b597051 100644 --- a/polymer/eduke32/source/jaudiolib/src/fx_man.c +++ b/polymer/eduke32/source/jaudiolib/src/fx_man.c @@ -226,13 +226,13 @@ static wavefmt_t FX_AutoDetectFormat(const char *ptr, uint32_t length) 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) { - 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 handle = -1; @@ -256,7 +256,7 @@ int32_t FX_PlayLoopedAuto(char *ptr, uint32_t length, int32_t loopstart, int32_t 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 handle = -1; @@ -280,19 +280,6 @@ int32_t FX_PlayAuto3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitch 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 *, ...)) { MV_SetPrintf(function); diff --git a/polymer/eduke32/source/jaudiolib/src/multivoc.c b/polymer/eduke32/source/jaudiolib/src/multivoc.c index c15d8036f..a1aaa04c7 100644 --- a/polymer/eduke32/source/jaudiolib/src/multivoc.c +++ b/polymer/eduke32/source/jaudiolib/src/multivoc.c @@ -1026,20 +1026,6 @@ int32_t MV_Shutdown(void) 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; } const char *loopStartTags[loopStartTagCount] = { "LOOP_START", "LOOPSTART" }; diff --git a/polymer/eduke32/source/jaudiolib/src/multivoc.h b/polymer/eduke32/source/jaudiolib/src/multivoc.h index a82e4c6e6..2f34033a2 100644 --- a/polymer/eduke32/source/jaudiolib/src/multivoc.h +++ b/polymer/eduke32/source/jaudiolib/src/multivoc.h @@ -96,8 +96,6 @@ extern int32_t MV_ErrorCode; enum MV_Errors { - MV_Warning = -2, - MV_Error = -1, MV_Ok = 0, MV_NotInstalled, 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, void *initdata); int32_t MV_Shutdown(void); -int32_t MV_SetVoiceCallback(int32_t handle, uint32_t callbackval); void MV_SetPrintf(void (*function)(const char *fmt, ...)); #ifdef __cplusplus diff --git a/polymer/eduke32/source/midi.c b/polymer/eduke32/source/midi.c index 95ba85feb..a29a7350b 100644 --- a/polymer/eduke32/source/midi.c +++ b/polymer/eduke32/source/midi.c @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/polymer/eduke32/source/music.c b/polymer/eduke32/source/music.c index f981aec38..4d31bd8ff 100644 --- a/polymer/eduke32/source/music.c +++ b/polymer/eduke32/source/music.c @@ -87,33 +87,10 @@ const char *MUSIC_ErrorString ErrorString = "Music ok."; 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 : ErrorString = "Error playing MIDI file."; break; - case MUSIC_TaskManError : - ErrorString = "TaskMan error."; - break; - - case MUSIC_DPMI_Error : - ErrorString = "DPMI Error in MUSIC."; - break; - default : ErrorString = "Unknown Music error code."; 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 @@ -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 @@ -327,7 +256,6 @@ int32_t MUSIC_StopSong ) { - MUSIC_StopFade(); MIDI_StopSong(); MUSIC_SetErrorCode(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 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) diff --git a/polymer/eduke32/source/sdlmusic.c b/polymer/eduke32/source/sdlmusic.c index 358edc053..835ee76e8 100644 --- a/polymer/eduke32/source/sdlmusic.c +++ b/polymer/eduke32/source/sdlmusic.c @@ -299,18 +299,6 @@ void MUSIC_SetVolume(int32_t volume) } // 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) { return (Mix_VolumeMusic(-1) << 1); // convert 0-128 to 0-255. @@ -323,12 +311,6 @@ void MUSIC_SetLoopFlag(int32_t loopflag) } // MUSIC_SetLoopFlag -int32_t MUSIC_SongPlaying(void) -{ - return ((Mix_PlayingMusic()) ? TRUE : FALSE); -} // MUSIC_SongPlaying - - void MUSIC_Continue(void) { 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) {} diff --git a/polymer/eduke32/source/sounds.c b/polymer/eduke32/source/sounds.c index b2e452f5a..593aa19ac 100644 --- a/polymer/eduke32/source/sounds.c +++ b/polymer/eduke32/source/sounds.c @@ -235,7 +235,7 @@ int32_t S_PlayMusic(const char *fn) else { 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, FX_MUSIC_PRIORITY, MUSIC_ID); 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) { - 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? g_sounds[num].pr, (num * MAXSOUNDINSTANCES) + j); } else { // 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, pitch, sndang>>4, FX_VOLUME(sndist>>6), 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) - 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), g_sounds[num].soundsiz, (num * MAXSOUNDINSTANCES) + j); 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), g_sounds[num].pr, (num * MAXSOUNDINSTANCES) + j); diff --git a/polymer/eduke32/source/sounds_mapster32.c b/polymer/eduke32/source/sounds_mapster32.c index 36823d5e8..cdbe3c7ae 100644 --- a/polymer/eduke32/source/sounds_mapster32.c +++ b/polymer/eduke32/source/sounds_mapster32.c @@ -260,12 +260,12 @@ int32_t S_PlaySound3D(int32_t num, int32_t i, const vec3_t *pos) if (g_sounds[num].num > 0) 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); } 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); } @@ -319,12 +319,12 @@ void S_PlaySound(int32_t num) 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); } 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); }