Correctly used Attributes.h instead of a definition directly in SoftwareMixer.cpp
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
parent
f68984bd58
commit
afd3abecc4
1 changed files with 2 additions and 7 deletions
|
@ -5,17 +5,12 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "../../Attributes.h"
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define CLAMP(x, y, z) MIN(MAX((x), (y)), (z))
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ATTR_HOT __attribute__((hot))
|
||||
#else
|
||||
#define ATTR_HOT
|
||||
#endif
|
||||
|
||||
struct Mixer_Sound
|
||||
{
|
||||
unsigned char *samples;
|
||||
|
@ -144,7 +139,7 @@ void Mixer_SetSoundPan(Mixer_Sound *sound, long pan)
|
|||
}
|
||||
|
||||
// Most CPU-intensive function in the game (2/3rd CPU time consumption in my experience), so marked with attrHot so the compiler considers it a hot spot (as it is) when optimizing
|
||||
ATTR_HOT void Mixer_MixSounds(float *stream, unsigned int frames_total)
|
||||
ATTRIBUTE_HOT void Mixer_MixSounds(float *stream, unsigned int frames_total)
|
||||
{
|
||||
for (Mixer_Sound *sound = sound_list_head; sound != NULL; sound = sound->next)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue