GameKit: give up default template parameter for gcc2

This commit is contained in:
Jérôme Duval 2020-12-08 15:46:55 +01:00
parent 2db8ba2c8d
commit 65b3fe452a
2 changed files with 6 additions and 22 deletions

View File

@ -32,14 +32,6 @@ struct _gs_media_tracker {
// Local utility functions -----------------------------------------------
template<typename T>
inline bool
FillBuffer(_gs_ramp* ramp, T* dest, const T* src, size_t* bytes)
{
return ::FillBuffer<T, 0>(ramp, dest, src, bytes);
}
template<typename T, int middle>
bool
FillBuffer(_gs_ramp* ramp, T* dest, const T* src, size_t* bytes)
@ -220,19 +212,19 @@ BFileGameSound::FillBuffer(void* inBuffer, size_t inByteCount)
break;
case gs_audio_format::B_GS_S16:
rampDone = ::FillBuffer<int16>(fPausing,
rampDone = ::FillBuffer<int16, 0>(fPausing,
(int16*)&buffer[out_offset],
(int16*)&fBuffer[fPlayPosition], &bytes);
break;
case gs_audio_format::B_GS_S32:
rampDone = ::FillBuffer<int32>(fPausing,
rampDone = ::FillBuffer<int32, 0>(fPausing,
(int32*)&buffer[out_offset],
(int32*)&fBuffer[fPlayPosition], &bytes);
break;
case gs_audio_format::B_GS_F:
rampDone = ::FillBuffer<float>(fPausing,
rampDone = ::FillBuffer<float, 0>(fPausing,
(float*)&buffer[out_offset],
(float*)&fBuffer[fPlayPosition], &bytes);
break;

View File

@ -43,14 +43,6 @@
#include "GSUtility.h"
// Sound Buffer Utility functions ----------------------------------------
template<typename T>
static inline void
ApplyMod(T* data, int64 index, float* pan)
{
return ApplyMod<T, 0>(data, index, pan);
}
template<typename T, int middle>
static inline void
ApplyMod(T* data, int64 index, float* pan)
@ -280,7 +272,7 @@ GameSoundBuffer::Play(void * data, int64 frames)
case gs_audio_format::B_GS_S16:
{
for (int64 i = 0; i < frames; i++) {
ApplyMod<int16>((int16*)data, i, pan);
ApplyMod<int16, 0>((int16*)data, i, pan);
UpdateMods();
}
@ -290,7 +282,7 @@ GameSoundBuffer::Play(void * data, int64 frames)
case gs_audio_format::B_GS_S32:
{
for (int64 i = 0; i < frames; i++) {
ApplyMod<int32>((int32*)data, i, pan);
ApplyMod<int32, 0>((int32*)data, i, pan);
UpdateMods();
}
@ -300,7 +292,7 @@ GameSoundBuffer::Play(void * data, int64 frames)
case gs_audio_format::B_GS_F:
{
for (int64 i = 0; i < frames; i++) {
ApplyMod<float>((float*)data, i, pan);
ApplyMod<float, 0>((float*)data, i, pan);
UpdateMods();
}