hrev54767 adds 1 changeset to branch 'master'
old head: 2db8ba2c8df9c505a2d5840d68682455982682cf
new head: 65b3fe452a8d5878bfbff7a9d825a51b402ea15b
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=65b3fe452a8d+%5E2db8ba2c8df9
----------------------------------------------------------------------------
65b3fe452a8d: GameKit: give up default template parameter for gcc2
[ Jérôme Duval <jerome.duval@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev54767
Commit: 65b3fe452a8d5878bfbff7a9d825a51b402ea15b
URL: https://git.haiku-os.org/haiku/commit/?id=65b3fe452a8d
Author: Jérôme Duval <jerome.duval@xxxxxxxxx>
Date: Tue Dec 8 14:46:55 2020 UTC
----------------------------------------------------------------------------
2 files changed, 6 insertions(+), 22 deletions(-)
src/kits/game/FileGameSound.cpp | 14 +++-----------
src/kits/game/GameSoundBuffer.cpp | 14 +++-----------
----------------------------------------------------------------------------
diff --git a/src/kits/game/FileGameSound.cpp b/src/kits/game/FileGameSound.cpp
index 5efc23f26d..7463864a9f 100644
--- a/src/kits/game/FileGameSound.cpp
+++ b/src/kits/game/FileGameSound.cpp
@@ -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;
diff --git a/src/kits/game/GameSoundBuffer.cpp
b/src/kits/game/GameSoundBuffer.cpp
index 578db6930e..294803b0fb 100644
--- a/src/kits/game/GameSoundBuffer.cpp
+++ b/src/kits/game/GameSoundBuffer.cpp
@@ -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();
}