add: mixer_datasize = samples_buf * mixer_spec.channels * 2; mixer_data = (sint32 *) HMalloc (sizeof (uint32) * mixer_datasize);
context: mixSDL_OpenAudio (uint32 frequency, uint32 format, uint32 chunksize){	SDL_AudioSpec desired;	/* If the mixer is already opened, increment open count */	if (audio_opened)	{	    ++audio_opened;	    return true;	}	last_error = MIX_NO_ERROR;	memset (active_sources, 0, sizeof(mixSDL_Source*) * MAX_SOURCES);	desired.channels = MIX_FORMAT_CHANS (format);	if (MIX_FORMAT_BPC (format) == 1)		desired.format = AUDIO_U8;	else if (MIX_FORMAT_BPC (format) == 2)		desired.format = AUDIO_S16SYS;	else	{		mixSDL_SetError (MIX_INVALID_VALUE);		fprintf (stderr, "mixSDL_OpenAudio: invalid format\n");		return false;	}	/* Set the desired format and frequency */	desired.freq = frequency;	desired.samples = chunksize;	desired.callback = mixSDL_mix_channels;	desired.userdata = NULL;	/* Accept nearly any audio format */	if (SDL_OpenAudio (&desired, &mixer_spec) < 0)	{		mixSDL_SetError (MIX_SDL_FAILURE);		return false;	}	if (mixer_spec.format == AUDIO_U8)	{		mixer_chansize = 1;		mixer_silence = 128;	}	else if (mixer_spec.format == AUDIO_S16SYS)	{		mixer_chansize = 2;		mixer_silence = 0;	}	else		mixer_chansize = 0;	if (mixer_chansize == 0 ||			mixer_spec.channels < 1 || mixer_spec.channels > 2)	{		mixSDL_SetError (MIX_SDL_FAILURE);		SDL_CloseAudio ();		fprintf (stderr, "mixSDL_OpenAudio: unable to aquire "				"desired format\n");		return false;	}	mixer_format = MIX_FORMAT_MAKE (			mixer_chansize, mixer_spec.channels);	mixer_sampsize = mixer_chansize * mixer_spec.channels;	mixer_freq = mixer_spec.freq;	mixSDL_InitMutex (src_mutex, "mixSDL_SourceMutex");	mixSDL_InitMutex (buf_mutex, "mixSDL_BufferMutex");	mixSDL_InitMutex (act_mutex, "mixSDL_ActiveMutex");	audio_opened = 1;	SDL_PauseAudio (0);	return true;}