src/audio/SDL_mixer.c
changeset 1 cf2af46e9e2a
parent 0 74212992fb08
child 252 e8157fcb3114
equal deleted inserted replaced
0:74212992fb08 1:cf2af46e9e2a
    94 
    94 
    95 /* The volume ranges from 0 - 128 */
    95 /* The volume ranges from 0 - 128 */
    96 #define ADJUST_VOLUME(s, v)	(s = (s*v)/SDL_MIX_MAXVOLUME)
    96 #define ADJUST_VOLUME(s, v)	(s = (s*v)/SDL_MIX_MAXVOLUME)
    97 #define ADJUST_VOLUME_U8(s, v)	(s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128)
    97 #define ADJUST_VOLUME_U8(s, v)	(s = (((s-128)*v)/SDL_MIX_MAXVOLUME)+128)
    98 
    98 
    99 void SDL_MixAudio (Uint8 *dst, Uint8 *src, Uint32 len, int volume)
    99 void SDL_MixAudio (Uint8 *dst, const Uint8 *src, Uint32 len, int volume)
   100 {
   100 {
   101 	Uint16 format;
   101 	Uint16 format;
   102 
   102 
   103 	if ( volume == 0 ) {
   103 	if ( volume == 0 ) {
   104 		return;
   104 		return;