[sdlsound] alt audio converter

Ryan C. Gordon icculus at clutteredmind.org
Tue Jun 18 17:35:19 EDT 2002


> regarding the issue with min() macro (and now the abs() macro, too),
> I figured out they are in my stdlib.h. I missed the changes of ryan,
> where he replaced them with the ?:. May I ask you or ryan to
> remove the inclusion of stdlib.h and replace it with a platform
> independ header or an definition in an more sensible place? I am not
> sure whether and where they are available on the the different
> supported systems. I dislike to replace them with operator ?:,
> because this did not state the intend of the function.

I'm going to put this at the top of alt_audio_convert.c:

 #ifndef min
 #define min(x, y) (((x) < (y)) ? (x) : (y))
 #endif

 #ifndef max
 #define max(x, y) (((x) > (y)) ? (x) : (y))
 #endif

That'll make it work universally, I imagine.

--ryan.






More information about the sdlsound mailing list