create static method

Create a mixer that generates audio to a memory buffer.

Usually you want MIX_CreateMixerDevice() instead of this function. The mixer created here can be used with MIX_Generate() to produce more data on demand, as fast as desired.

An audio format must be specified. This is the format it will output in. This cannot be NULL.

Once a mixer is created, next steps are usually to load audio (through MIX_LoadAudio() and friends), create a track (MIX_CreateTrack()), and play that audio through that track.

When done with the mixer, it can be destroyed with MIX_DestroyMixer().

\param spec the audio format that mixer will generate. \returns a mixer that can be used to generate audio, or NULL on failure; call SDL_GetError() for more information.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL_mixer 3.0.0.

\sa MIX_CreateMixerDevice \sa MIX_DestroyMixer

extern SDL_DECLSPEC MIX_Mixer * SDLCALL MIX_CreateMixer(const SDL_AudioSpec *spec)

{@category mixer}

Implementation

static Pointer<MixMixer> create(Pointer<SdlAudioSpec> spec) =>
    mixCreateMixer(spec);