1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Use static inline

This commit is contained in:
Ted John
2017-01-12 18:29:29 +00:00
parent 1bf7a0ffdb
commit ab4bb3101c

View File

@@ -89,9 +89,9 @@ void Mixer_Channel_SetGroup(void* channel, int group);
void* Mixer_Play_Music(int pathId, int loop, int streaming);
void Mixer_SetVolume(float volume);
inline int DStoMixerVolume(int volume) { return (int)(SDL_MIX_MAXVOLUME * (SDL_pow(10, (float)volume / 2000))); }
inline float DStoMixerPan(int pan) { return (((float)pan + -DSBPAN_LEFT) / DSBPAN_RIGHT) / 2; }
inline double DStoMixerRate(int frequency) { return (double)frequency / 22050; }
static inline int DStoMixerVolume(int volume) { return (int)(SDL_MIX_MAXVOLUME * (SDL_pow(10, (float)volume / 2000))); }
static inline float DStoMixerPan(int pan) { return (((float)pan + -DSBPAN_LEFT) / DSBPAN_RIGHT) / 2; }
static inline double DStoMixerRate(int frequency) { return (double)frequency / 22050; }
#ifdef __cplusplus
}