Initialize and configure the mixer API

Playback is configured with:

  • The output sample frequency, in samples per second (Hz).
  • The output sample format, may be mix_default_format.
  • The number of sound channels, 1 for mono or 2 for stereo.
  • The number of bytes used by output sample size as chunk_size.

Property definitions

sdl2 $ Mix :: open_audio
	# Initialize and configure the mixer API
	#
	# Playback is configured with:
	# * The output sample `frequency`, in samples per second (Hz).
	# * The output sample `format`, may be `mix_default_format`.
	# * The number of sound `channels`, 1 for mono or 2 for stereo.
	# * The number of bytes used by output sample size as `chunk_size`.
	fun open_audio(frequency: Int, format: MixFormat, channels, chunk_size: Int): Bool `{
		return Mix_OpenAudio(frequency, format, channels, chunk_size) == 0;
	`}
lib/sdl2/mixer.nit:57,2--66,3