mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
- sound system additions from NBlood, except for the backing code for OPL playback.
This commit is contained in:
parent
5865d96306
commit
c2e4a6cb64
15 changed files with 160 additions and 48 deletions
|
@ -64,9 +64,13 @@ int32_t FX_Shutdown(void);
|
|||
|
||||
|
||||
int32_t FX_Play(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, float volume, uint32_t callbackval);
|
||||
int32_t vol, int32_t left, int32_t right, int32_t priority, float volume, intptr_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, float volume, uint32_t callbackval);
|
||||
int32_t distance, int32_t priority, float volume, intptr_t callbackval);
|
||||
int32_t FX_PlayRaw(char *ptr, uint32_t ptrlength, int32_t rate, int32_t pitchoffset, int32_t vol,
|
||||
int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval);
|
||||
int32_t FX_PlayLoopedRaw(char *ptr, uint32_t ptrlength, char *loopstart, char *loopend, int32_t rate,
|
||||
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval);
|
||||
|
||||
|
||||
int32_t FX_SetPrintf(void(*function)(const char *, ...));
|
||||
|
@ -85,7 +89,7 @@ static FORCE_INLINE int FX_CheckMVErr(int32_t status)
|
|||
return status;
|
||||
}
|
||||
|
||||
static FORCE_INLINE void FX_SetCallBack(void(*function)(uint32_t)) { MV_SetCallBack(function); }
|
||||
static FORCE_INLINE void FX_SetCallBack(void(*function)(intptr_t)) { MV_SetCallBack(function); }
|
||||
static FORCE_INLINE void FX_SetVolume(int32_t volume) { MV_SetVolume(volume); }
|
||||
static FORCE_INLINE int32_t FX_GetVolume(void) { return MV_GetVolume(); }
|
||||
static FORCE_INLINE void FX_SetReverseStereo(int32_t setting) { MV_SetReverseStereo(setting); }
|
||||
|
|
|
@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#define MULTIVOC_H_
|
||||
|
||||
#include "compat.h"
|
||||
#include "drivers.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -87,29 +88,31 @@ void MV_SetReverbDelay(int32_t delay);
|
|||
// int32_t MV_StartPlayback( void );
|
||||
// void MV_StopPlayback( void );
|
||||
int32_t MV_PlayWAV3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority,
|
||||
float volume, uint32_t callbackval);
|
||||
float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayWAV(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, float volume, uint32_t callbackval);
|
||||
int32_t priority, float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayVOC3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority,
|
||||
float volume, uint32_t callbackval);
|
||||
float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayVOC(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, float volume, uint32_t callbackval);
|
||||
int32_t priority, float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayVorbis3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority,
|
||||
float volume, uint32_t callbackval);
|
||||
float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayVorbis(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, float volume, uint32_t callbackval);
|
||||
int32_t priority, float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayFLAC3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority,
|
||||
float volume, uint32_t callbackval);
|
||||
float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayFLAC(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, float volume, uint32_t callbackval);
|
||||
int32_t priority, float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayXA3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, float volume,
|
||||
uint32_t callbackval);
|
||||
intptr_t callbackval);
|
||||
int32_t MV_PlayXA(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, float volume, uint32_t callbackval);
|
||||
int32_t priority, float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayXMP3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority,
|
||||
float volume, uint32_t callbackval);
|
||||
float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayXMP(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, float volume, uint32_t callbackval);
|
||||
int32_t priority, float volume, intptr_t callbackval);
|
||||
int32_t MV_PlayRAW(char *ptr, uint32_t length, int32_t rate, char *loopstart, char *loopend, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right,
|
||||
int32_t priority, float volume, intptr_t callbackval);
|
||||
|
||||
int MV_IdentifyXMP(char const *ptr, uint32_t length);
|
||||
|
||||
|
@ -119,7 +122,7 @@ int32_t MV_SetPosition(int32_t handle, int32_t position);
|
|||
// void MV_CreateVolumeTable( int32_t index, int32_t volume, int32_t MaxVolume );
|
||||
void MV_SetVolume(int32_t volume);
|
||||
int32_t MV_GetVolume(void);
|
||||
void MV_SetCallBack(void (*function)(uint32_t));
|
||||
void MV_SetCallBack(void (*function)(intptr_t));
|
||||
void MV_SetReverseStereo(int32_t setting);
|
||||
int32_t MV_GetReverseStereo(void);
|
||||
int32_t MV_Init(int32_t soundcard, int32_t MixRate, int32_t Voices, int32_t numchannels,
|
||||
|
|
|
@ -53,6 +53,13 @@ typedef struct
|
|||
uint32_t tick;
|
||||
} songposition;
|
||||
|
||||
enum MIDI_Device
|
||||
{
|
||||
MIDIDEVICE_NONE = -1,
|
||||
MIDIDEVICE_MPU = 0,
|
||||
MIDIDEVICE_OPL
|
||||
};
|
||||
|
||||
#define MUSIC_LoopSong ( 1 == 1 )
|
||||
#define MUSIC_PlayOnce ( !MUSIC_LoopSong )
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ typedef struct VoiceNode
|
|||
int32_t handle;
|
||||
int32_t priority;
|
||||
|
||||
uint32_t callbackval;
|
||||
intptr_t callbackval;
|
||||
} VoiceNode;
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -372,7 +372,7 @@ Begin playback of sound data at specified angle and distance
|
|||
from listener.
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
int32_t MV_PlayFLAC3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t MV_PlayFLAC3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
int32_t left;
|
||||
int32_t right;
|
||||
|
@ -414,7 +414,7 @@ Begin playback of sound data with the given sound levels and
|
|||
priority.
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
int32_t MV_PlayFLAC(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, float volume, uint32_t callbackval)
|
||||
int32_t MV_PlayFLAC(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, float volume, intptr_t callbackval)
|
||||
{
|
||||
VoiceNode *voice;
|
||||
flac_data *fd = 0;
|
||||
|
@ -657,7 +657,7 @@ void MV_ReleaseFLACVoice(VoiceNode *voice)
|
|||
#include "_multivc.h"
|
||||
|
||||
int32_t MV_PlayFLAC(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, float volume, uint32_t callbackval)
|
||||
int32_t vol, int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
@ -676,7 +676,7 @@ int32_t MV_PlayFLAC(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t lo
|
|||
}
|
||||
|
||||
int32_t MV_PlayFLAC3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitchoffset, int32_t angle,
|
||||
int32_t distance, int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t distance, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
|
|
@ -300,8 +300,31 @@ end_of_data:
|
|||
return NoMoreData;
|
||||
}
|
||||
|
||||
static playbackstatus MV_GetNextRAWBlock(VoiceNode *voice)
|
||||
{
|
||||
if (voice->BlockLength == 0)
|
||||
{
|
||||
if (voice->LoopStart == NULL)
|
||||
return NoMoreData;
|
||||
|
||||
voice->BlockLength = voice->LoopSize;
|
||||
voice->NextBlock = voice->LoopStart;
|
||||
voice->length = 0;
|
||||
voice->position = 0;
|
||||
}
|
||||
|
||||
voice->sound = voice->NextBlock;
|
||||
voice->position -= voice->length;
|
||||
voice->length = min(voice->BlockLength, 0x8000u);
|
||||
voice->NextBlock += voice->length * (voice->channels * voice->bits / 8);
|
||||
voice->BlockLength -= voice->length;
|
||||
voice->length <<= 16;
|
||||
|
||||
return KeepPlaying;
|
||||
}
|
||||
|
||||
int32_t MV_PlayWAV3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance,
|
||||
int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
@ -322,7 +345,7 @@ int32_t MV_PlayWAV3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitcho
|
|||
}
|
||||
|
||||
int32_t MV_PlayWAV(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, float volume, uint32_t callbackval)
|
||||
int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
@ -412,7 +435,7 @@ int32_t MV_PlayWAV(char *ptr, uint32_t length, int32_t loopstart, int32_t loopen
|
|||
}
|
||||
|
||||
int32_t MV_PlayVOC3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle,
|
||||
int32_t distance, int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t distance, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
@ -433,7 +456,7 @@ int32_t MV_PlayVOC3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitcho
|
|||
}
|
||||
|
||||
int32_t MV_PlayVOC(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, float volume, uint32_t callbackval)
|
||||
int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
@ -482,3 +505,48 @@ int32_t MV_PlayVOC(char *ptr, uint32_t length, int32_t loopstart, int32_t loopen
|
|||
return voice->handle;
|
||||
}
|
||||
|
||||
int32_t MV_PlayRAW(char *ptr, uint32_t length, int32_t rate, char *loopstart, char *loopend, int32_t pitchoffset, int32_t vol,
|
||||
int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
||||
// Request a voice from the voice pool
|
||||
VoiceNode *voice = MV_AllocVoice(priority);
|
||||
|
||||
if (voice == NULL)
|
||||
{
|
||||
MV_SetErrorCode(MV_NoVoices);
|
||||
return MV_Error;
|
||||
}
|
||||
|
||||
voice->rawdataptr = (uint8_t *)ptr;
|
||||
voice->ptrlength = length;
|
||||
voice->Paused = FALSE;
|
||||
voice->wavetype = FMT_RAW;
|
||||
voice->bits = 8;
|
||||
voice->channels = 1;
|
||||
voice->GetSound = MV_GetNextRAWBlock;
|
||||
voice->NextBlock = ptr;
|
||||
voice->LoopCount = 0;
|
||||
voice->position = 0;
|
||||
voice->BlockLength = length;
|
||||
voice->PitchScale = PITCH_GetScale(pitchoffset);
|
||||
voice->length = 0;
|
||||
voice->next = NULL;
|
||||
voice->prev = NULL;
|
||||
voice->priority = priority;
|
||||
voice->callbackval = callbackval;
|
||||
voice->LoopStart = loopstart;
|
||||
voice->LoopEnd = loopend;
|
||||
voice->LoopSize = loopend - loopstart + 1;
|
||||
|
||||
voice->volume = volume;
|
||||
|
||||
MV_SetVoicePitch(voice, rate, pitchoffset);
|
||||
MV_SetVoiceVolume(voice, vol, left, right, volume);
|
||||
MV_PlayVoice(voice);
|
||||
|
||||
return voice->handle;
|
||||
}
|
||||
|
||||
|
|
|
@ -135,9 +135,9 @@ static wavefmt_t FX_DetectFormat(char const * const ptr, uint32_t length)
|
|||
}
|
||||
|
||||
int32_t FX_Play(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, float volume, uint32_t callbackval)
|
||||
int32_t vol, int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
static int32_t(*const func[])(char *, uint32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float, uint32_t) =
|
||||
static int32_t(*const func[])(char *, uint32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float, intptr_t) =
|
||||
{ NULL, NULL, MV_PlayVOC, MV_PlayWAV, MV_PlayVorbis, MV_PlayFLAC, MV_PlayXA, MV_PlayXMP };
|
||||
|
||||
EDUKE32_STATIC_ASSERT(FMT_MAX == ARRAY_SIZE(func));
|
||||
|
@ -157,9 +157,9 @@ int32_t FX_Play(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loopen
|
|||
}
|
||||
|
||||
int32_t FX_Play3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance,
|
||||
int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
static int32_t (*const func[])(char *, uint32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float, uint32_t) =
|
||||
static int32_t (*const func[])(char *, uint32_t, int32_t, int32_t, int32_t, int32_t, int32_t, float, intptr_t) =
|
||||
{ NULL, NULL, MV_PlayVOC3D, MV_PlayWAV3D, MV_PlayVorbis3D, MV_PlayFLAC3D, MV_PlayXA3D, MV_PlayXMP3D };
|
||||
|
||||
EDUKE32_STATIC_ASSERT(FMT_MAX == ARRAY_SIZE(func));
|
||||
|
@ -178,6 +178,34 @@ int32_t FX_Play3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitcho
|
|||
return handle;
|
||||
}
|
||||
|
||||
int32_t FX_PlayRaw(char *ptr, uint32_t ptrlength, int32_t rate, int32_t pitchoffset, int32_t vol,
|
||||
int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
int handle = MV_PlayRAW(ptr, ptrlength, rate, NULL, NULL, pitchoffset, vol, left, right, priority, volume, callbackval);
|
||||
|
||||
if (handle <= MV_Ok)
|
||||
{
|
||||
FX_SetErrorCode(FX_MultiVocError);
|
||||
handle = FX_Warning;
|
||||
}
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
int32_t FX_PlayLoopedRaw(char *ptr, uint32_t ptrlength, char *loopstart, char *loopend, int32_t rate,
|
||||
int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
int handle = MV_PlayRAW(ptr, ptrlength, rate, loopstart, loopend, pitchoffset, vol, left, right, priority, volume, callbackval);
|
||||
|
||||
if (handle <= MV_Ok)
|
||||
{
|
||||
FX_SetErrorCode(FX_MultiVocError);
|
||||
handle = FX_Warning;
|
||||
}
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
int32_t FX_SetPrintf(void (*function)(const char *, ...))
|
||||
{
|
||||
MV_SetPrintf(function);
|
||||
|
|
|
@ -82,7 +82,7 @@ static VoiceNode VoicePool;
|
|||
static int32_t MV_MixPage = 0;
|
||||
|
||||
void (*MV_Printf)(const char *fmt, ...) = NULL;
|
||||
static void (*MV_CallBackFunc)(uint32_t) = NULL;
|
||||
static void (*MV_CallBackFunc)(intptr_t) = NULL;
|
||||
|
||||
char *MV_MixDestination;
|
||||
const int16_t *MV_LeftVolume;
|
||||
|
@ -137,7 +137,9 @@ const char *MV_ErrorString(int32_t ErrorNumber)
|
|||
|
||||
static bool MV_Mix(VoiceNode *voice, int const buffer)
|
||||
{
|
||||
if (voice->length == 0 && voice->GetSound(voice) != KeepPlaying)
|
||||
/* cheap fix for a crash under 64-bit linux */
|
||||
/* v v v v */
|
||||
if (voice->length == 0 && (voice->GetSound == NULL || voice->GetSound(voice) != KeepPlaying))
|
||||
return false;
|
||||
|
||||
int32_t length = MV_MIXBUFFERSIZE;
|
||||
|
@ -881,7 +883,7 @@ void MV_SetVolume(int32_t volume)
|
|||
|
||||
int32_t MV_GetVolume(void) { return MV_TotalVolume; }
|
||||
|
||||
void MV_SetCallBack(void (*function)(uint32_t)) { MV_CallBackFunc = function; }
|
||||
void MV_SetCallBack(void (*function)(intptr_t)) { MV_CallBackFunc = function; }
|
||||
|
||||
void MV_SetReverseStereo(int32_t setting) { MV_ReverseStereo = setting; }
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ Begin playback of sound data at specified angle and distance
|
|||
from listener.
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
int32_t MV_PlayVorbis3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t MV_PlayVorbis3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
{
|
||||
|
@ -358,7 +358,7 @@ Begin playback of sound data with the given sound levels and
|
|||
priority.
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
int32_t MV_PlayVorbis(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, float volume, uint32_t callbackval)
|
||||
int32_t MV_PlayVorbis(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, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(loopend);
|
||||
|
||||
|
@ -469,7 +469,7 @@ void MV_ReleaseVorbisVoice( VoiceNode * voice )
|
|||
#include "_multivc.h"
|
||||
|
||||
int32_t MV_PlayVorbis(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, float volume, uint32_t callbackval)
|
||||
int32_t vol, int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
@ -488,7 +488,7 @@ int32_t MV_PlayVorbis(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t
|
|||
}
|
||||
|
||||
int32_t MV_PlayVorbis3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitchoffset, int32_t angle,
|
||||
int32_t distance, int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t distance, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
|
|
@ -366,7 +366,7 @@ from listener.
|
|||
---------------------------------------------------------------------*/
|
||||
|
||||
int32_t MV_PlayXA3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, float volume,
|
||||
uint32_t callbackval)
|
||||
intptr_t callbackval)
|
||||
{
|
||||
int32_t left;
|
||||
int32_t right;
|
||||
|
@ -409,7 +409,7 @@ priority.
|
|||
---------------------------------------------------------------------*/
|
||||
|
||||
int32_t MV_PlayXA(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, float volume, uint32_t callbackval)
|
||||
int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
VoiceNode *voice;
|
||||
xa_data * xad = 0;
|
||||
|
|
|
@ -62,7 +62,7 @@ static playbackstatus MV_GetNextXMPBlock(VoiceNode *voice)
|
|||
return KeepPlaying;
|
||||
}
|
||||
|
||||
int32_t MV_PlayXMP3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t MV_PlayXMP3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
int32_t left;
|
||||
int32_t right;
|
||||
|
@ -96,7 +96,7 @@ int32_t MV_PlayXMP3D(char *ptr, uint32_t length, int32_t loophow, int32_t pitcho
|
|||
return status;
|
||||
}
|
||||
|
||||
int32_t MV_PlayXMP(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, float volume, uint32_t callbackval)
|
||||
int32_t MV_PlayXMP(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, float volume, intptr_t callbackval)
|
||||
{
|
||||
VoiceNode *voice;
|
||||
xmp_data * xmpd = 0;
|
||||
|
@ -208,7 +208,7 @@ void MV_ReleaseXMPVoice(VoiceNode * voice)
|
|||
static char const NoXMP[] = "MV_PlayXMP: libxmp-lite support not included in this binary.\n";
|
||||
|
||||
int32_t MV_PlayXMP(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, float volume, uint32_t callbackval)
|
||||
int32_t left, int32_t right, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
@ -227,7 +227,7 @@ int32_t MV_PlayXMP(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loo
|
|||
}
|
||||
|
||||
int32_t MV_PlayXMP3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitchoffset, int32_t angle,
|
||||
int32_t distance, int32_t priority, float volume, uint32_t callbackval)
|
||||
int32_t distance, int32_t priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
|
|
@ -921,9 +921,9 @@ void S_Update(void)
|
|||
|
||||
// S_Callback() can be called from either the audio thread when a sound ends, or the main thread
|
||||
// when playing back a new sound needs an existing sound to be stopped first
|
||||
void S_Callback(uint32_t num)
|
||||
void S_Callback(intptr_t num)
|
||||
{
|
||||
if ((int32_t)num == MUSIC_ID)
|
||||
if (num == MUSIC_ID)
|
||||
return;
|
||||
|
||||
mutex_lock(&m_callback);
|
||||
|
|
|
@ -65,7 +65,7 @@ extern int32_t g_numEnvSoundsPlaying,g_highestSoundIdx;
|
|||
|
||||
bool A_CheckSoundPlaying(int spriteNum,int soundNum);
|
||||
int A_PlaySound(int soundNum, int spriteNum);
|
||||
void S_Callback(uint32_t num);
|
||||
void S_Callback(intptr_t num);
|
||||
bool A_CheckAnySoundPlaying(int spriteNum);
|
||||
bool S_CheckSoundPlaying(int soundNum);
|
||||
void S_Cleanup(void);
|
||||
|
|
|
@ -915,9 +915,9 @@ void S_Update(void)
|
|||
} while (++sndnum <= highest);
|
||||
}
|
||||
|
||||
void S_Callback(uint32_t num)
|
||||
void S_Callback(intptr_t num)
|
||||
{
|
||||
if ((int32_t)num == MUSIC_ID)
|
||||
if (num == MUSIC_ID)
|
||||
return;
|
||||
|
||||
dq[dnum & (DQSIZE - 1)] = num;
|
||||
|
|
|
@ -66,7 +66,7 @@ extern int32_t g_numEnvSoundsPlaying,g_highestSoundIdx;
|
|||
|
||||
bool A_CheckSoundPlaying(int spriteNum,int soundNum);
|
||||
int A_PlaySound(int soundNum, int spriteNum);
|
||||
void S_Callback(uint32_t num);
|
||||
void S_Callback(intptr_t num);
|
||||
bool A_CheckAnySoundPlaying(int spriteNum);
|
||||
bool S_CheckSoundPlaying(int spriteNum,int soundNum);
|
||||
void S_Cleanup(void);
|
||||
|
|
Loading…
Reference in a new issue