4#include "SDL3pp_audio.h"
5#include "SDL3pp_version.h"
7#if defined(SDL3PP_ENABLE_MIXER) || defined(SDL3PP_DOC)
9#include <SDL3_mixer/SDL_mixer.h>
254 constexpr Mixer(std::nullptr_t =
nullptr) noexcept
255 : m_resource(
nullptr)
267 : m_resource(resource)
276 :
Mixer(other.release())
361 ~Mixer() { MIX_DestroyMixer(m_resource); }
366 std::swap(m_resource, other.m_resource);
380 m_resource =
nullptr;
388 constexpr explicit operator bool() const noexcept {
return !!m_resource; }
704 bool closeio =
false);
782 bool free_when_done);
1372 :
Mixer(resource.get())
1390 :
Mixer(other.get())
1396 :
Mixer(other.get())
1511 : m_lock(std::move(other.m_lock))
1542 std::swap(m_lock, other.m_lock);
1547 constexpr operator bool()
const {
return bool(m_lock); }
1600 constexpr Audio(std::nullptr_t =
nullptr) noexcept
1601 : m_resource(
nullptr)
1613 : m_resource(resource)
1622 :
Audio(other.release())
1805 bool closeio =
false);
1849 std::swap(m_resource, other.m_resource);
1862 auto r = m_resource;
1863 m_resource =
nullptr;
1871 constexpr explicit operator bool() const noexcept {
return !!m_resource; }
2080 :
Audio(other.get())
2086 :
Audio(other.get())
2283 constexpr Track(std::nullptr_t =
nullptr) noexcept
2284 : m_resource(
nullptr)
2296 : m_resource(resource)
2305 :
Track(other.release())
2345 std::swap(m_resource, other.m_resource);
2358 auto r = m_resource;
2359 m_resource =
nullptr;
2367 constexpr explicit operator bool() const noexcept {
return !!m_resource; }
2590 bool closeio =
false);
3641 :
Track(other.get())
3647 :
Track(other.get())
3763 constexpr Group(std::nullptr_t =
nullptr) noexcept
3764 : m_resource(
nullptr)
3776 : m_resource(resource)
3785 :
Group(other.release())
3831 std::swap(m_resource, other.m_resource);
3844 auto r = m_resource;
3845 m_resource =
nullptr;
3853 constexpr explicit operator bool() const noexcept {
return !!m_resource; }
3976 :
Group(other.get())
3982 :
Group(other.get())
4010#define SDL_MIXER_MAJOR_VERSION
4019#define SDL_MIXER_MINOR_VERSION
4028#define SDL_MIXER_MICRO_VERSION
4037#define SDL_MIXER_VERSION \
4039 SDL_MIXER_MAJOR_VERSION, SDL_MIXER_MINOR_VERSION, SDL_MIXER_MICRO_VERSION)
4046#define SDL_MIXER_VERSION_ATLEAST(X, Y, Z) \
4047 ((SDL_MIXER_MAJOR_VERSION >= X) && \
4048 (SDL_MIXER_MAJOR_VERSION > X || SDL_MIXER_MINOR_VERSION >= Y) && \
4049 (SDL_MIXER_MAJOR_VERSION > X || SDL_MIXER_MINOR_VERSION > Y || \
4050 SDL_MIXER_MICRO_VERSION >= Z))
4072inline int Version() {
return MIX_Version(); }
4092inline void Init() {
CheckError(MIX_Init()); }
4128inline void Quit() { MIX_Quit(); }
4185 return MIX_GetAudioDecoder(index);
4235 return Mixer(devid, spec);
4239 : m_resource(
CheckError(MIX_CreateMixerDevice(devid, &spec)))
4244 : m_resource(
CheckError(MIX_CreateMixer(&spec)))
4323 return CheckError(MIX_GetMixerProperties(mixer));
4331namespace prop::Mixer {
4333constexpr auto DEVICE_NUMBER = MIX_PROP_MIXER_DEVICE_NUMBER;
4423 : m_lock(std::move(resource))
4455 std::move(lock).reset();
4460 if (!m_lock)
return;
4524 bool closeio =
false)
4526 return Audio(mixer, io, predecode, closeio);
4531 return Audio(m_resource, io, predecode, closeio);
4538 : m_resource(MIX_LoadAudio_IO(mixer, io, predecode, closeio))
4543 : m_resource(MIX_LoadAudio(mixer, path, predecode))
4548 : m_resource(
CheckError(MIX_LoadAudioWithProperties(props)))
4556 : m_resource(
CheckError(MIX_LoadRawAudio_IO(mixer, io, &spec, closeio)))
4562 MIX_LoadRawAudio(mixer, data.data(), data.size_bytes(), &spec)))
4596 return Audio(mixer, std::move(path), predecode);
4601 return Audio(m_resource, std::move(path), predecode);
4662 bool free_when_done)
4721 return Audio(props);
4724namespace prop::Audio {
4726constexpr auto LOAD_IOSTREAM_POINTER = MIX_PROP_AUDIO_LOAD_IOSTREAM_POINTER;
4728constexpr auto LOAD_CLOSEIO_BOOLEAN = MIX_PROP_AUDIO_LOAD_CLOSEIO_BOOLEAN;
4730constexpr auto LOAD_PREDECODE_BOOLEAN = MIX_PROP_AUDIO_LOAD_PREDECODE_BOOLEAN;
4732constexpr auto LOAD_PREFERRED_MIXER_POINTER =
4733 MIX_PROP_AUDIO_LOAD_PREFERRED_MIXER_POINTER;
4735constexpr auto LOAD_SKIP_METADATA_TAGS_BOOLEAN =
4736 MIX_PROP_AUDIO_LOAD_SKIP_METADATA_TAGS_BOOLEAN;
4738constexpr auto DECODER_STRING = MIX_PROP_AUDIO_DECODER_STRING;
4779 bool closeio =
false)
4781 return Audio(mixer, io, spec, closeio);
4788 return Audio(m_resource, io, spec, closeio);
4829 return Audio(mixer, std::move(data), spec);
4834 return Audio(m_resource, std::move(data), spec);
4880 bool free_when_done)
4888 bool free_when_done)
4891 m_resource, std::move(data), spec, free_when_done);
4935 return Audio(
CheckError(MIX_CreateSineWaveAudio(mixer, hz, amplitude, ms)));
4988 return CheckError(MIX_GetAudioProperties(audio));
4996namespace prop::MixMetadata {
4998constexpr auto TITLE_STRING = MIX_PROP_METADATA_TITLE_STRING;
5000constexpr auto ARTIST_STRING = MIX_PROP_METADATA_ARTIST_STRING;
5002constexpr auto ALBUM_STRING = MIX_PROP_METADATA_ALBUM_STRING;
5004constexpr auto COPYRIGHT_STRING = MIX_PROP_METADATA_COPYRIGHT_STRING;
5006constexpr auto TRACK_NUMBER = MIX_PROP_METADATA_TRACK_NUMBER;
5008constexpr auto TOTAL_TRACKS_NUMBER = MIX_PROP_METADATA_TOTAL_TRACKS_NUMBER;
5010constexpr auto YEAR_NUMBER = MIX_PROP_METADATA_YEAR_NUMBER;
5012constexpr auto DURATION_FRAMES_NUMBER =
5013 MIX_PROP_METADATA_DURATION_FRAMES_NUMBER;
5015constexpr auto DURATION_INFINITE_BOOLEAN =
5016 MIX_PROP_METADATA_DURATION_INFINITE_BOOLEAN;
5054 return MIX_GetAudioDuration(audio);
5142 : m_resource(
CheckError(MIX_CreateTrack(mixer)))
5187 return CheckError(MIX_GetTrackProperties(track));
5298 CheckError(MIX_SetTrackAudioStream(track, stream));
5355 bool closeio =
false)
5357 CheckError(MIX_SetTrackIOStream(track, io, closeio));
5416 bool closeio =
false)
5418 CheckError(MIX_SetTrackRawIOStream(track, io, &spec, closeio));
5490 MIX_UntagTrack(track, tag);
5514 auto result =
CheckError(MIX_GetTrackTags(track, &count));
5540 auto result =
CheckError(MIX_GetTaggedTracks(mixer, tag, &count));
5586 CheckError(MIX_SetTrackPlaybackPosition(track, frames));
5619 return MIX_GetTrackPlaybackPosition(track);
5651 return MIX_GetTrackFadeFrames(track);
5719 CheckError(MIX_SetTrackLoops(track, num_loops));
5749 return MIX_GetTrackAudio(track);
5777 return MIX_GetTrackAudioStream(track);
5812 return MIX_GetTrackRemaining(track);
5844 return MIX_TrackMSToFrames(track, ms.count());
5879 return Milliseconds(MIX_TrackFramesToMS(track, frames));
5908 return MIX_AudioMSToFrames(audio, ms.count());
5940 return Milliseconds(MIX_AudioFramesToMS(audio, frames));
5966 return MIX_MSToFrames(sample_rate, ms.count());
5992 return Milliseconds(MIX_FramesToMS(sample_rate, frames));
6115namespace prop::Play {
6117constexpr auto LOOPS_NUMBER = MIX_PROP_PLAY_LOOPS_NUMBER;
6119constexpr auto MAX_FRAME_NUMBER = MIX_PROP_PLAY_MAX_FRAME_NUMBER;
6121constexpr auto MAX_MILLISECONDS_NUMBER = MIX_PROP_PLAY_MAX_MILLISECONDS_NUMBER;
6123constexpr auto START_FRAME_NUMBER = MIX_PROP_PLAY_START_FRAME_NUMBER;
6125constexpr auto START_MILLISECOND_NUMBER =
6126 MIX_PROP_PLAY_START_MILLISECOND_NUMBER;
6128constexpr auto LOOP_START_FRAME_NUMBER = MIX_PROP_PLAY_LOOP_START_FRAME_NUMBER;
6130constexpr auto LOOP_START_MILLISECOND_NUMBER =
6131 MIX_PROP_PLAY_LOOP_START_MILLISECOND_NUMBER;
6133constexpr auto FADE_IN_FRAMES_NUMBER = MIX_PROP_PLAY_FADE_IN_FRAMES_NUMBER;
6135constexpr auto FADE_IN_MILLISECONDS_NUMBER =
6136 MIX_PROP_PLAY_FADE_IN_MILLISECONDS_NUMBER;
6138constexpr auto FADE_IN_START_GAIN_FLOAT =
6139 MIX_PROP_PLAY_FADE_IN_START_GAIN_FLOAT;
6141constexpr auto APPEND_SILENCE_FRAMES_NUMBER =
6142 MIX_PROP_PLAY_APPEND_SILENCE_FRAMES_NUMBER;
6144constexpr auto APPEND_SILENCE_MILLISECONDS_NUMBER =
6145 MIX_PROP_PLAY_APPEND_SILENCE_MILLISECONDS_NUMBER;
6147constexpr auto HALT_WHEN_EXHAUSTED_BOOLEAN =
6148 MIX_PROP_PLAY_HALT_WHEN_EXHAUSTED_BOOLEAN;
6189 CheckError(MIX_PlayTag(mixer, tag, options));
6229 return MIX_PlayAudio(mixer, audio);
6271 return MIX_StopTrack(track, fade_out_frames);
6310 CheckError(MIX_StopAllTracks(mixer, fade_out_ms));
6351 CheckError(MIX_StopTag(mixer, tag, fade_out_ms));
6730 CheckError(MIX_SetTagGain(mixer, tag, gain));
6767 CheckError(MIX_SetMixerFrequencyRatio(mixer, ratio));
6793 return MIX_GetMixerFrequencyRatio(mixer);
6826 CheckError(MIX_SetTrackFrequencyRatio(track, ratio));
6861 return MIX_GetTrackFrequencyRatio(track);
6907 MIX_SetTrackOutputChannelMap(track, chmap.data(),
narrowS32(chmap.size())));
6947 CheckError(MIX_SetTrackStereo(track, &gains));
6999 CheckError(MIX_SetTrack3DPosition(track, &position));
7026 CheckError(MIX_GetTrack3DPosition(track, &position));
7069 : m_resource(
CheckError(MIX_CreateGroup(mixer)))
7110 return CheckError(MIX_GetGroupProperties(group));
7204 CheckError(MIX_SetTrackStoppedCallback(track, cb, userdata));
7282 CheckError(MIX_SetTrackRawCallback(track, cb, userdata));
7363 CheckError(MIX_SetTrackCookedCallback(track, cb, userdata));
7440 CheckError(MIX_SetGroupPostMixCallback(group, cb, userdata));
7503 CheckError(MIX_SetPostMixCallback(mixer, cb, userdata));
7626 : m_resource(
nullptr)
7638 : m_resource(resource)
7726 bool closeio =
false,
7735 std::swap(m_resource, other.m_resource);
7748 auto r = m_resource;
7749 m_resource =
nullptr;
7758 constexpr explicit operator bool() const noexcept {
return !!m_resource; }
7947 : m_resource(MIX_CreateAudioDecoder(path, props))
7954 : m_resource(MIX_CreateAudioDecoder_IO(io, closeio, props))
7994 bool closeio =
false,
8013 MIX_DestroyAudioDecoder(audiodecoder);
8043 return CheckError(MIX_GetAudioDecoderProperties(audiodecoder));
8069 CheckError(MIX_GetAudioDecoderFormat(audiodecoder, spec));
An opaque object that represents an audio decoder.
Definition: SDL3pp_mixer.h:7620
constexpr AudioDecoder(AudioDecoderRaw resource) noexcept
Constructs from raw AudioDecoder.
Definition: SDL3pp_mixer.h:7637
constexpr AudioDecoder & operator=(AudioDecoder &&other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:7733
constexpr AudioDecoder(const AudioDecoder &other) noexcept=delete
Copy constructor.
constexpr auto operator<=>(const AudioDecoder &other) const noexcept=default
Comparison.
constexpr AudioDecoderRaw get() const noexcept
Retrieves underlying AudioDecoderRaw.
Definition: SDL3pp_mixer.h:7743
constexpr AudioDecoder(std::nullptr_t=nullptr) noexcept
Default ctor.
Definition: SDL3pp_mixer.h:7625
~AudioDecoder()
Destructor.
Definition: SDL3pp_mixer.h:7730
AudioDecoder & operator=(const AudioDecoder &other)=delete
Assignment operator.
constexpr AudioDecoder(AudioDecoder &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:7646
constexpr AudioDecoderRaw release() noexcept
Retrieves underlying AudioDecoderRaw and clear this.
Definition: SDL3pp_mixer.h:7746
An opaque object that represents audio data.
Definition: SDL3pp_mixer.h:1595
constexpr Audio(Audio &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:1621
constexpr Audio(AudioRaw resource) noexcept
Constructs from raw Audio.
Definition: SDL3pp_mixer.h:1612
constexpr AudioRaw release() noexcept
Retrieves underlying AudioRaw and clear this.
Definition: SDL3pp_mixer.h:1860
Audio & operator=(const Audio &other)=delete
Assignment operator.
constexpr Audio(const Audio &other) noexcept=delete
Copy constructor.
constexpr Audio(std::nullptr_t=nullptr) noexcept
Default ctor.
Definition: SDL3pp_mixer.h:1600
constexpr auto operator<=>(const Audio &other) const noexcept=default
Comparison.
constexpr Audio & operator=(Audio &&other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:1847
~Audio()
Destructor.
Definition: SDL3pp_mixer.h:1844
constexpr AudioRaw get() const noexcept
Retrieves underlying AudioRaw.
Definition: SDL3pp_mixer.h:1857
An opaque object that represents a grouping of tracks.
Definition: SDL3pp_mixer.h:3758
constexpr Group(const Group &other) noexcept=delete
Copy constructor.
constexpr Group(std::nullptr_t=nullptr) noexcept
Default ctor.
Definition: SDL3pp_mixer.h:3763
~Group()
Destructor.
Definition: SDL3pp_mixer.h:3826
constexpr Group & operator=(Group &&other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:3829
constexpr GroupRaw get() const noexcept
Retrieves underlying GroupRaw.
Definition: SDL3pp_mixer.h:3839
constexpr auto operator<=>(const Group &other) const noexcept=default
Comparison.
Group & operator=(const Group &other)=delete
Assignment operator.
constexpr GroupRaw release() noexcept
Retrieves underlying GroupRaw and clear this.
Definition: SDL3pp_mixer.h:3842
constexpr Group(GroupRaw resource) noexcept
Constructs from raw Group.
Definition: SDL3pp_mixer.h:3775
constexpr Group(Group &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:3784
Lock a mixer by obtaining its internal mutex.
Definition: SDL3pp_mixer.h:1457
MixerRef resource() const
Get the reference to locked resource.
Definition: SDL3pp_mixer.h:1572
MixerLock(MixerLock &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:1510
void release()
Releases the lock without unlocking.
Definition: SDL3pp_mixer.h:1575
~MixerLock()
Unlock a mixer previously locked by a call to Mixer.Lock().
Definition: SDL3pp_mixer.h:1535
MixerLock(const MixerLock &other)=delete
Copy constructor.
MixerLock & operator=(MixerLock &&other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:1540
An opaque object that represents a mixer.
Definition: SDL3pp_mixer.h:249
constexpr Mixer(MixerRaw resource) noexcept
Constructs from raw Mixer.
Definition: SDL3pp_mixer.h:266
constexpr Mixer(Mixer &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:275
Mixer & operator=(const Mixer &other)=delete
Assignment operator.
constexpr MixerRaw release() noexcept
Retrieves underlying MixerRaw and clear this.
Definition: SDL3pp_mixer.h:377
constexpr Mixer(std::nullptr_t=nullptr) noexcept
Default ctor.
Definition: SDL3pp_mixer.h:254
~Mixer()
Destructor.
Definition: SDL3pp_mixer.h:361
constexpr auto operator<=>(const Mixer &other) const noexcept=default
Comparison.
constexpr MixerRaw get() const noexcept
Retrieves underlying MixerRaw.
Definition: SDL3pp_mixer.h:374
constexpr Mixer & operator=(Mixer &&other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:364
constexpr Mixer(const Mixer &other) noexcept=delete
Copy constructor.
Base class for SDL memory allocated array wrap.
Definition: SDL3pp_ownPtr.h:44
Source byte stream.
Definition: SDL3pp_strings.h:237
constexpr size_t size_bytes() const
Retrieves contained size in bytes.
Definition: SDL3pp_strings.h:301
constexpr const char * data() const
Retrieves contained data.
Definition: SDL3pp_strings.h:304
Helpers to use C++ strings parameters.
Definition: SDL3pp_strings.h:43
Target byte stream.
Definition: SDL3pp_strings.h:323
constexpr char * data() const
Retrieves contained data.
Definition: SDL3pp_strings.h:409
constexpr size_t size_bytes() const
Retrieves contained size in bytes.
Definition: SDL3pp_strings.h:406
An opaque object that represents a source of sound output to be mixed.
Definition: SDL3pp_mixer.h:2278
constexpr Track(std::nullptr_t=nullptr) noexcept
Default ctor.
Definition: SDL3pp_mixer.h:2283
constexpr Track & operator=(Track &&other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:2343
constexpr Track(TrackRaw resource) noexcept
Constructs from raw Track.
Definition: SDL3pp_mixer.h:2295
constexpr Track(const Track &other) noexcept=delete
Copy constructor.
constexpr Track(Track &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:2304
constexpr TrackRaw get() const noexcept
Retrieves underlying TrackRaw.
Definition: SDL3pp_mixer.h:2353
~Track()
Destructor.
Definition: SDL3pp_mixer.h:2340
constexpr TrackRaw release() noexcept
Retrieves underlying TrackRaw and clear this.
Definition: SDL3pp_mixer.h:2356
constexpr auto operator<=>(const Track &other) const noexcept=default
Comparison.
Track & operator=(const Track &other)=delete
Assignment operator.
#define SDL_assert_paranoid(condition)
An assertion test that is performed only when built with paranoid settings.
Definition: SDL3pp_assert.h:383
SDL_AudioSpec AudioSpec
Format specifier for audio data.
Definition: SDL3pp_audio.h:190
constexpr void CheckError(bool result)
Check and throw if returned value from SDL is an error.
Definition: SDL3pp_error.h:199
void SetRawIOStream(IOStreamRef io, const AudioSpec &spec, bool closeio=false)
Set a Track's input to an IOStream providing raw PCM data.
Definition: SDL3pp_mixer.h:5421
Audio LoadRawAudio(MixerRef mixer, SourceBytes data, const AudioSpec &spec)
Load raw PCM data from a memory buffer.
Definition: SDL3pp_mixer.h:4825
void SetTrackStereo(TrackRef track, const StereoGains &gains)
Force a track to stereo output, with optionally left/right panning.
Definition: SDL3pp_mixer.h:6945
void ResumeAllTracks()
Resume all currently-paused tracks.
Definition: SDL3pp_mixer.h:6499
void SetTrackIOStream(TrackRef track, IOStreamRef io, bool closeio=false)
Set a Track's input to an IOStream.
Definition: SDL3pp_mixer.h:5353
Audio LoadAudioWithProperties(PropertiesRef props)
Load audio for playback through a collection of properties.
Definition: SDL3pp_mixer.h:4719
Audio LoadAudio(StringParam path, bool predecode)
Load audio for playback from a file.
Definition: SDL3pp_mixer.h:4599
void Destroy()
Free a mixer.
Definition: SDL3pp_mixer.h:4302
void SetTrackCookedCallback(TrackRef track, TrackMixCallback cb, void *userdata)
Set a callback that fires when the mixer has transformed a track's audio.
Definition: SDL3pp_mixer.h:7359
MixerRef GetMixer()
Get the Mixer that owns a Group.
Definition: SDL3pp_mixer.h:7136
PropertiesRef GetAudioDecoderProperties(AudioDecoderRef audiodecoder)
Get the properties associated with a AudioDecoder.
Definition: SDL3pp_mixer.h:8041
void SetPlaybackPosition(Sint64 frames)
Seek a playing track to a new position in its input.
Definition: SDL3pp_mixer.h:5589
float GetTrackFrequencyRatio(TrackRef track)
Query the frequency ratio of a track.
Definition: SDL3pp_mixer.h:6859
void GetMixerFormat(MixerRef mixer, AudioSpec *spec)
Get the audio format a mixer is generating.
Definition: SDL3pp_mixer.h:4365
void SetPostMixCallback(GroupMixCallback cb, void *userdata)
Set a callback that fires when a mixer group has completed mixing.
Definition: SDL3pp_mixer.h:7471
void SetTagGain(MixerRef mixer, StringParam tag, float gain)
Set the gain control of all tracks with a specific tag.
Definition: SDL3pp_mixer.h:6728
void SetStoppedCallback(TrackStoppedCallback cb, void *userdata)
Set a callback that fires when a Track is stopped.
Definition: SDL3pp_mixer.h:7239
void SetTrackPlaybackPosition(TrackRef track, Sint64 frames)
Seek a playing track to a new position in its input.
Definition: SDL3pp_mixer.h:5584
void UntagTrack(TrackRef track, StringParam tag)
Remove an arbitrary tag from a track.
Definition: SDL3pp_mixer.h:5488
float GetFrequencyRatio()
Query the frequency ratio of a track.
Definition: SDL3pp_mixer.h:6864
void Unlock(MixerLock &&lock)
Unlock a mixer previously locked by a call to Mixer.Lock().
Definition: SDL3pp_mixer.h:4452
Milliseconds FramesToMS(int sample_rate, Sint64 frames)
Convert sample frames, at a specific sample rate, to milliseconds.
Definition: SDL3pp_mixer.h:5990
void PauseTag(MixerRef mixer, StringParam tag)
Pause all tracks with a specific tag.
Definition: SDL3pp_mixer.h:6438
int DecodeAudio(TargetBytes buffer, const AudioSpec &spec)
Decode more audio from a AudioDecoder.
Definition: SDL3pp_mixer.h:8107
void PlayTrack(TrackRef track, PropertiesRef options=nullptr)
Start (or restart) mixing a track for playback.
Definition: SDL3pp_mixer.h:6105
MIX_Group * GroupRaw
Alias to raw representation for Group.
Definition: SDL3pp_mixer.h:139
Sint64 TrackMSToFrames(TrackRef track, Milliseconds ms)
Convert milliseconds to sample frames for a track's current format.
Definition: SDL3pp_mixer.h:5842
void Untag(StringParam tag)
Remove an arbitrary tag from a track.
Definition: SDL3pp_mixer.h:5493
OwnArray< char * > GetTrackTags(TrackRef track)
Get the tags currently associated with a track.
Definition: SDL3pp_mixer.h:5511
void ResumeTag(MixerRef mixer, StringParam tag)
Resume all tracks with a specific tag.
Definition: SDL3pp_mixer.h:6526
Audio CreateSineWaveAudio(MixerRef mixer, int hz, float amplitude, Sint64 ms)
Create a Audio that generates a sinewave.
Definition: SDL3pp_mixer.h:4930
void SetTrackStoppedCallback(TrackRef track, TrackStoppedCallback cb, void *userdata)
Set a callback that fires when a Track is stopped.
Definition: SDL3pp_mixer.h:7200
MIX_Point3D Point3D
3D coordinates for Track.Set3DPosition.
Definition: SDL3pp_mixer.h:2133
Sint64 GetPlaybackPosition()
Get the current input position of a playing track.
Definition: SDL3pp_mixer.h:5622
const char * GetAudioDecoder(int index)
Report the name of a specific audio decoders.
Definition: SDL3pp_mixer.h:4183
void GetAudioDecoderFormat(AudioDecoderRef audiodecoder, AudioSpec *spec)
Query the initial audio format of a AudioDecoder.
Definition: SDL3pp_mixer.h:8067
Sint64 GetFadeFrames()
Query whether a given track is fading.
Definition: SDL3pp_mixer.h:5654
MixerRef GetMixer()
Get the Mixer that owns a Track.
Definition: SDL3pp_mixer.h:5213
void DestroyAudioDecoder(AudioDecoderRaw audiodecoder)
Destroy the specified audio decoder.
Definition: SDL3pp_mixer.h:8011
void UnlockMixer(MixerRef mixer)
Unlock a mixer previously locked by a call to Mixer.Lock().
Definition: SDL3pp_mixer.h:4450
Track CreateTrack(MixerRef mixer)
Create a new track on a mixer.
Definition: SDL3pp_mixer.h:5137
bool Resume()
Resume a currently-paused track.
Definition: SDL3pp_mixer.h:6472
void SetGroupPostMixCallback(GroupRef group, GroupMixCallback cb, void *userdata)
Set a callback that fires when a mixer group has completed mixing.
Definition: SDL3pp_mixer.h:7436
void SetFrequencyRatio(float ratio)
Set a mixer's master frequency ratio.
Definition: SDL3pp_mixer.h:6770
MixerLock(MixerRef resource)
Lock a mixer by obtaining its internal mutex.
Definition: SDL3pp_mixer.h:4422
void SetTrackAudioStream(TrackRef track, AudioStreamRef stream)
Set a Track's input to an AudioStream.
Definition: SDL3pp_mixer.h:5296
void SetGain(float gain)
Set a mixer's master gain control.
Definition: SDL3pp_mixer.h:6620
Audio LoadRawAudio_IO(MixerRef mixer, IOStreamRef io, const AudioSpec &spec, bool closeio=false)
Load raw PCM data from an IOStream.
Definition: SDL3pp_mixer.h:4776
bool Playing()
Query if a track is currently playing.
Definition: SDL3pp_mixer.h:6561
bool PlayAudio(AudioRef audio)
Play a Audio from start to finish without any management.
Definition: SDL3pp_mixer.h:6232
OwnArray< TrackRef > GetTaggedTracks(StringParam tag)
Get all tracks with a specific tag.
Definition: SDL3pp_mixer.h:5544
int Generate(MixerRef mixer, TargetBytes buffer)
Generate mixer output when not driving an audio device.
Definition: SDL3pp_mixer.h:7593
void SetTrackOutputChannelMap(TrackRef track, std::span< const int > chmap)
Set the current output channel map of a track.
Definition: SDL3pp_mixer.h:6904
AudioRef GetAudio()
Query the Audio assigned to a track.
Definition: SDL3pp_mixer.h:5752
void(SDLCALL *)(void *userdata, TrackRaw track, const AudioSpec *spec, float *pcm, int samples) TrackMixCallback
A callback that fires when a Track is mixing at various stages.
Definition: SDL3pp_mixer.h:2222
Audio LoadAudio_IO(MixerRef mixer, IOStreamRef io, bool predecode, bool closeio=false)
Load audio for playback from an IOStream.
Definition: SDL3pp_mixer.h:4521
MIX_Audio * AudioRaw
Alias to raw representation for Audio.
Definition: SDL3pp_mixer.h:121
void DestroyMixer(MixerRaw mixer)
Free a mixer.
Definition: SDL3pp_mixer.h:4300
AudioStreamRef GetTrackAudioStream(TrackRef track)
Query the AudioStream assigned to a track.
Definition: SDL3pp_mixer.h:5775
void SetGroup(GroupRef group)
Assign a track to a mixing group.
Definition: SDL3pp_mixer.h:7166
void(SDLCALL *)(void *userdata, TrackRaw track) TrackStoppedCallback
A callback that fires when a Track is stopped.
Definition: SDL3pp_mixer.h:2156
Milliseconds FramesToMS(Sint64 frames)
Convert sample frames for a Audio's format to milliseconds.
Definition: SDL3pp_mixer.h:5943
void SetTrackRawCallback(TrackRef track, TrackMixCallback cb, void *userdata)
Set a callback that fires when a Track has initial decoded audio.
Definition: SDL3pp_mixer.h:7278
void Play(PropertiesRef options=nullptr)
Start (or restart) mixing a track for playback.
Definition: SDL3pp_mixer.h:6110
Milliseconds AudioFramesToMS(AudioRef audio, Sint64 frames)
Convert sample frames for a Audio's format to milliseconds.
Definition: SDL3pp_mixer.h:5938
TrackRef CreateTrack()
Create a new track on a mixer.
Definition: SDL3pp_mixer.h:5139
void SetTrackAudio(TrackRef track, AudioRef audio)
Set a Track's input to a Audio.
Definition: SDL3pp_mixer.h:5246
Audio LoadRawAudio(SourceBytes data, const AudioSpec &spec)
Load raw PCM data from a memory buffer.
Definition: SDL3pp_mixer.h:4832
void StopTag(MixerRef mixer, StringParam tag, Sint64 fade_out_ms)
Halt all tracks with a specific tag, possibly fading out over time.
Definition: SDL3pp_mixer.h:6349
void SetFrequencyRatio(float ratio)
Change the frequency ratio of a track.
Definition: SDL3pp_mixer.h:6829
void PauseAllTracks()
Pause all currently-playing tracks.
Definition: SDL3pp_mixer.h:6410
float GetGain()
Get a track's gain control.
Definition: SDL3pp_mixer.h:6692
PropertiesRef GetProperties()
Get the properties associated with a Audio.
Definition: SDL3pp_mixer.h:4991
void SetTagGain(StringParam tag, float gain)
Set the gain control of all tracks with a specific tag.
Definition: SDL3pp_mixer.h:6733
float GetGain()
Get a mixer's master gain control.
Definition: SDL3pp_mixer.h:6640
Sint64 MSToFrames(int sample_rate, Milliseconds ms)
Convert milliseconds to sample frames at a specific sample rate.
Definition: SDL3pp_mixer.h:5964
float GetFrequencyRatio()
Get a mixer's master frequency ratio.
Definition: SDL3pp_mixer.h:6796
constexpr Sint64 DURATION_INFINITE
Infinite duration, when the audio never runs out of sound to generate.
Definition: SDL3pp_mixer.h:5063
void SetStereo(const StereoGains &gains)
Force a track to stereo output, with optionally left/right panning.
Definition: SDL3pp_mixer.h:6950
bool ResumeTrack(TrackRef track)
Resume a currently-paused track.
Definition: SDL3pp_mixer.h:6470
void DestroyAudio(AudioRaw audio)
Destroy the specified audio.
Definition: SDL3pp_mixer.h:5111
PropertiesRef GetProperties()
Get the properties associated with a mixer.
Definition: SDL3pp_mixer.h:4326
bool StopTrack(TrackRef track, Sint64 fade_out_frames)
Halt a currently-playing track, possibly fading out over time.
Definition: SDL3pp_mixer.h:6269
void SetTrackRawIOStream(TrackRef track, IOStreamRef io, const AudioSpec &spec, bool closeio=false)
Set a Track's input to an IOStream providing raw PCM data.
Definition: SDL3pp_mixer.h:5413
bool PauseTrack(TrackRef track)
Pause a currently-playing track.
Definition: SDL3pp_mixer.h:6381
float GetTrackGain(TrackRef track)
Get a track's gain control.
Definition: SDL3pp_mixer.h:6690
void SetPostMixCallback(MixerRef mixer, PostMixCallback cb, void *userdata)
Set a callback that fires when all mixing has completed.
Definition: SDL3pp_mixer.h:7499
void Destroy()
Destroy a mixing group.
Definition: SDL3pp_mixer.h:7089
PropertiesRef GetTrackProperties(TrackRef track)
Get the properties associated with a track.
Definition: SDL3pp_mixer.h:5185
Sint64 GetRemaining()
Return the number of sample frames remaining to be mixed in a track.
Definition: SDL3pp_mixer.h:5815
void Destroy()
Destroy the specified audio decoder.
Definition: SDL3pp_mixer.h:8016
void SetAudio(AudioRef audio)
Set a Track's input to a Audio.
Definition: SDL3pp_mixer.h:5251
Audio LoadRawAudioNoCopy(SourceBytes data, const AudioSpec &spec, bool free_when_done)
Load raw PCM data from a memory buffer without making a copy.
Definition: SDL3pp_mixer.h:4886
float GetMixerGain(MixerRef mixer)
Get a mixer's master gain control.
Definition: SDL3pp_mixer.h:6638
int GetNumAudioDecoders()
Report the number of audio decoders available for use.
Definition: SDL3pp_mixer.h:4152
void SetCookedCallback(TrackMixCallback cb, void *userdata)
Set a callback that fires when the mixer has transformed a track's audio.
Definition: SDL3pp_mixer.h:7401
Sint64 GetAudioDuration(AudioRef audio)
Get the length of a Audio's playback in sample frames.
Definition: SDL3pp_mixer.h:5052
PropertiesRef GetProperties()
Get the properties associated with a track.
Definition: SDL3pp_mixer.h:5190
void StopTag(StringParam tag, Sint64 fade_out_ms)
Halt all tracks with a specific tag, possibly fading out over time.
Definition: SDL3pp_mixer.h:6354
void StopAllTracks(MixerRef mixer, Sint64 fade_out_ms)
Halt all currently-playing tracks, possibly fading out over time.
Definition: SDL3pp_mixer.h:6308
Sint64 GetTrackRemaining(TrackRef track)
Return the number of sample frames remaining to be mixed in a track.
Definition: SDL3pp_mixer.h:5810
Mixer CreateMixerDevice(AudioDeviceRef devid, const AudioSpec &spec)
Create a mixer that plays sound directly to an audio device.
Definition: SDL3pp_mixer.h:4233
void TagTrack(TrackRef track, StringParam tag)
Assign an arbitrary tag to a track.
Definition: SDL3pp_mixer.h:5455
PropertiesRef GetAudioProperties(AudioRef audio)
Get the properties associated with a Audio.
Definition: SDL3pp_mixer.h:4986
void(SDLCALL *)(void *userdata, MixerRaw mixer, const AudioSpec *spec, float *pcm, int samples) PostMixCallback
A callback that fires when all mixing has completed.
Definition: SDL3pp_mixer.h:193
Audio LoadAudio(MixerRef mixer, StringParam path, bool predecode)
Load audio for playback from a file.
Definition: SDL3pp_mixer.h:4594
void PauseAllTracks(MixerRef mixer)
Pause all currently-playing tracks.
Definition: SDL3pp_mixer.h:6405
void GetFormat(AudioSpec *spec)
Query the initial audio format of a Audio.
Definition: SDL3pp_mixer.h:5086
void GetFormat(AudioSpec *spec)
Query the initial audio format of a AudioDecoder.
Definition: SDL3pp_mixer.h:8072
void Tag(StringParam tag)
Assign an arbitrary tag to a track.
Definition: SDL3pp_mixer.h:5460
MIX_StereoGains StereoGains
A set of per-channel gains for tracks using Track.SetStereo().
Definition: SDL3pp_mixer.h:2121
int GetLoops()
Query how many loops remain for a given track.
Definition: SDL3pp_mixer.h:5687
AudioDecoder CreateAudioDecoder_IO(IOStreamRef io, bool closeio=false, PropertiesRef props=nullptr)
Create a AudioDecoder from an IOStream.
Definition: SDL3pp_mixer.h:7993
Audio LoadAudioNoCopy(MixerRef mixer, SourceBytes data, bool free_when_done)
Load audio for playback from a memory buffer without making a copy.
Definition: SDL3pp_mixer.h:4660
Audio LoadAudio_IO(IOStreamRef io, bool predecode, bool closeio=false)
Load audio for playback from an IOStream.
Definition: SDL3pp_mixer.h:4529
Sint64 AudioMSToFrames(AudioRef audio, Milliseconds ms)
Convert milliseconds to sample frames for a Audio's format.
Definition: SDL3pp_mixer.h:5906
void LockMixer(MixerRef mixer)
Lock a mixer by obtaining its internal mutex.
Definition: SDL3pp_mixer.h:4418
PropertiesRef GetMixerProperties(MixerRef mixer)
Get the properties associated with a mixer.
Definition: SDL3pp_mixer.h:4321
float GetMixerFrequencyRatio(MixerRef mixer)
Get a mixer's master frequency ratio.
Definition: SDL3pp_mixer.h:6791
void SetTrackFrequencyRatio(TrackRef track, float ratio)
Change the frequency ratio of a track.
Definition: SDL3pp_mixer.h:6824
bool Stop(Sint64 fade_out_frames)
Halt a currently-playing track, possibly fading out over time.
Definition: SDL3pp_mixer.h:6274
bool TrackPlaying(TrackRef track)
Query if a track is currently playing.
Definition: SDL3pp_mixer.h:6559
MIX_AudioDecoder * AudioDecoderRaw
Alias to raw representation for AudioDecoder.
Definition: SDL3pp_mixer.h:148
Milliseconds TrackFramesToMS(TrackRef track, Sint64 frames)
Convert sample frames for a track's current format to milliseconds.
Definition: SDL3pp_mixer.h:5877
void reset()
Unlock a mixer previously locked by a call to Mixer.Lock().
Definition: SDL3pp_mixer.h:4458
bool Paused()
Query if a track is currently paused.
Definition: SDL3pp_mixer.h:6588
AudioDecoder CreateAudioDecoder(StringParam path, PropertiesRef props=nullptr)
Create a AudioDecoder from a path on the filesystem.
Definition: SDL3pp_mixer.h:7940
Group CreateGroup(MixerRef mixer)
Create a mixing group.
Definition: SDL3pp_mixer.h:7064
Sint64 GetTrackFadeFrames(TrackRef track)
Query whether a given track is fading.
Definition: SDL3pp_mixer.h:5649
MixerLock Lock()
Lock a mixer by obtaining its internal mutex.
Definition: SDL3pp_mixer.h:4420
Audio LoadAudioNoCopy(SourceBytes data, bool free_when_done)
Load audio for playback from a memory buffer without making a copy.
Definition: SDL3pp_mixer.h:4668
PropertiesRef GetGroupProperties(GroupRef group)
Get the properties associated with a group.
Definition: SDL3pp_mixer.h:7108
void SetRawCallback(TrackMixCallback cb, void *userdata)
Set a callback that fires when a Track has initial decoded audio.
Definition: SDL3pp_mixer.h:7317
void SetMixerFrequencyRatio(MixerRef mixer, float ratio)
Set a mixer's master frequency ratio.
Definition: SDL3pp_mixer.h:6765
constexpr Sint64 DURATION_UNKNOWN
Unknown duration, when the length of the audio can't be determined.
Definition: SDL3pp_mixer.h:5060
Audio LoadRawAudioNoCopy(MixerRef mixer, SourceBytes data, const AudioSpec &spec, bool free_when_done)
Load raw PCM data from a memory buffer without making a copy.
Definition: SDL3pp_mixer.h:4877
void SetTrack3DPosition(TrackRef track, const Point3D &position)
Set a track's position in 3D space.
Definition: SDL3pp_mixer.h:6997
bool PlayAudio(MixerRef mixer, AudioRef audio)
Play a Audio from start to finish without any management.
Definition: SDL3pp_mixer.h:6227
void ResumeAllTracks(MixerRef mixer)
Resume all currently-paused tracks.
Definition: SDL3pp_mixer.h:6494
void DestroyGroup(GroupRaw group)
Destroy a mixing group.
Definition: SDL3pp_mixer.h:7087
void SetTrackGroup(TrackRef track, GroupRef group)
Assign a track to a mixing group.
Definition: SDL3pp_mixer.h:7161
Milliseconds FramesToMS(Sint64 frames)
Convert sample frames for a track's current format to milliseconds.
Definition: SDL3pp_mixer.h:5882
MixerRef GetTrackMixer(TrackRef track)
Get the Mixer that owns a Track.
Definition: SDL3pp_mixer.h:5208
Audio CreateSineWaveAudio(int hz, float amplitude, Sint64 ms)
Create a Audio that generates a sinewave.
Definition: SDL3pp_mixer.h:4938
void PlayTag(MixerRef mixer, StringParam tag, PropertiesRef options)
Start (or restart) mixing all tracks with a specific tag for playback.
Definition: SDL3pp_mixer.h:6187
void Set3DPosition(const Point3D &position)
Set a track's position in 3D space.
Definition: SDL3pp_mixer.h:7002
void SetPostMixCallback(PostMixCallback cb, void *userdata)
Set a callback that fires when all mixing has completed.
Definition: SDL3pp_mixer.h:7532
int Generate(TargetBytes buffer)
Generate mixer output when not driving an audio device.
Definition: SDL3pp_mixer.h:7599
PropertiesRef GetProperties()
Get the properties associated with a group.
Definition: SDL3pp_mixer.h:7113
MixerRef GetGroupMixer(GroupRef group)
Get the Mixer that owns a Group.
Definition: SDL3pp_mixer.h:7131
bool TrackPaused(TrackRef track)
Query if a track is currently paused.
Definition: SDL3pp_mixer.h:6586
void SetMixerGain(MixerRef mixer, float gain)
Set a mixer's master gain control.
Definition: SDL3pp_mixer.h:6615
void PlayTag(StringParam tag, PropertiesRef options)
Start (or restart) mixing all tracks with a specific tag for playback.
Definition: SDL3pp_mixer.h:6192
void GetFormat(AudioSpec *spec)
Get the audio format a mixer is generating.
Definition: SDL3pp_mixer.h:4370
void SetTrackGain(TrackRef track, float gain)
Set a track's gain control.
Definition: SDL3pp_mixer.h:6667
Audio LoadRawAudio_IO(IOStreamRef io, const AudioSpec &spec, bool closeio=false)
Load raw PCM data from an IOStream.
Definition: SDL3pp_mixer.h:4784
AudioStreamRef GetAudioStream()
Query the AudioStream assigned to a track.
Definition: SDL3pp_mixer.h:5780
int GetTrackLoops(TrackRef track)
Query how many loops remain for a given track.
Definition: SDL3pp_mixer.h:5685
Sint64 GetDuration()
Get the length of a Audio's playback in sample frames.
Definition: SDL3pp_mixer.h:5057
Sint64 MSToFrames(Milliseconds ms)
Convert milliseconds to sample frames for a Audio's format.
Definition: SDL3pp_mixer.h:5911
OwnArray< char * > GetTags()
Get the tags currently associated with a track.
Definition: SDL3pp_mixer.h:5518
void SetIOStream(IOStreamRef io, bool closeio=false)
Set a Track's input to an IOStream.
Definition: SDL3pp_mixer.h:5360
Sint64 GetTrackPlaybackPosition(TrackRef track)
Get the current input position of a playing track.
Definition: SDL3pp_mixer.h:5617
void DestroyTrack(TrackRaw track)
Destroy the specified track.
Definition: SDL3pp_mixer.h:5164
MIX_Track * TrackRaw
Alias to raw representation for Track.
Definition: SDL3pp_mixer.h:130
void SetTrackLoops(TrackRef track, int num_loops)
Change the number of times a currently-playing track will loop.
Definition: SDL3pp_mixer.h:5717
void PauseTag(StringParam tag)
Pause all tracks with a specific tag.
Definition: SDL3pp_mixer.h:6443
Point3D GetTrack3DPosition(TrackRef track)
Get a track's current position in 3D space.
Definition: SDL3pp_mixer.h:7023
MIX_Mixer * MixerRaw
Alias to raw representation for Mixer.
Definition: SDL3pp_mixer.h:112
Mixer CreateMixer(const AudioSpec &spec)
Create a mixer that generates audio to a memory buffer.
Definition: SDL3pp_mixer.h:4275
void SetLoops(int num_loops)
Change the number of times a currently-playing track will loop.
Definition: SDL3pp_mixer.h:5722
void StopAllTracks(Sint64 fade_out_ms)
Halt all currently-playing tracks, possibly fading out over time.
Definition: SDL3pp_mixer.h:6313
void GetAudioFormat(AudioRef audio, AudioSpec *spec)
Query the initial audio format of a Audio.
Definition: SDL3pp_mixer.h:5081
void(SDLCALL *)(void *userdata, GroupRaw group, const AudioSpec *spec, float *pcm, int samples) GroupMixCallback
A callback that fires when a Group has completed mixing.
Definition: SDL3pp_mixer.h:3702
PropertiesRef GetProperties()
Get the properties associated with a AudioDecoder.
Definition: SDL3pp_mixer.h:8046
OwnArray< TrackRef > GetTaggedTracks(MixerRef mixer, StringParam tag)
Get all tracks with a specific tag.
Definition: SDL3pp_mixer.h:5537
void SetOutputChannelMap(std::span< const int > chmap)
Set the current output channel map of a track.
Definition: SDL3pp_mixer.h:6910
bool Pause()
Pause a currently-playing track.
Definition: SDL3pp_mixer.h:6383
void Destroy()
Destroy the specified audio.
Definition: SDL3pp_mixer.h:5113
void ResumeTag(StringParam tag)
Resume all tracks with a specific tag.
Definition: SDL3pp_mixer.h:6531
Point3D Get3DPosition()
Get a track's current position in 3D space.
Definition: SDL3pp_mixer.h:7030
GroupRef CreateGroup()
Create a mixing group.
Definition: SDL3pp_mixer.h:7066
void SetGain(float gain)
Set a track's gain control.
Definition: SDL3pp_mixer.h:6672
void Destroy()
Destroy the specified track.
Definition: SDL3pp_mixer.h:5166
int DecodeAudio(AudioDecoderRef audiodecoder, TargetBytes buffer, const AudioSpec &spec)
Decode more audio from a AudioDecoder.
Definition: SDL3pp_mixer.h:8097
void SetAudioStream(AudioStreamRef stream)
Set a Track's input to an AudioStream.
Definition: SDL3pp_mixer.h:5301
Sint64 MSToFrames(Milliseconds ms)
Convert milliseconds to sample frames for a track's current format.
Definition: SDL3pp_mixer.h:5847
AudioRef GetTrackAudio(TrackRef track)
Query the Audio assigned to a track.
Definition: SDL3pp_mixer.h:5747
std::chrono::milliseconds Milliseconds
Duration in Miliseconds (Uint32).
Definition: SDL3pp_stdinc.h:326
::Sint64 Sint64
A signed 64-bit integer type.
Definition: SDL3pp_stdinc.h:296
Main include header for the SDL3pp library.
Sint32 narrowS32(T value)
Narrows to Sint32.
Definition: SDL3pp_stdinc.h:6425
Reference for AudioDecoder.
Definition: SDL3pp_mixer.h:7841
constexpr AudioDecoderRef(const AudioDecoder &resource) noexcept
Constructs from AudioDecoder.
Definition: SDL3pp_mixer.h:7863
~AudioDecoderRef()
Destructor.
Definition: SDL3pp_mixer.h:7893
constexpr AudioDecoderRef(AudioDecoderRaw resource) noexcept
Constructs from raw AudioDecoder.
Definition: SDL3pp_mixer.h:7851
constexpr AudioDecoderRef(AudioDecoder &&resource) noexcept
Constructs from AudioDecoder.
Definition: SDL3pp_mixer.h:7875
constexpr AudioDecoderRef(const AudioDecoderRef &other) noexcept
Copy constructor.
Definition: SDL3pp_mixer.h:7881
AudioDecoderRef & operator=(const AudioDecoderRef &other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:7896
constexpr AudioDecoderRef(AudioDecoderRef &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:7887
Reference for AudioDevice.
Definition: SDL3pp_audio.h:1476
Reference for Audio.
Definition: SDL3pp_mixer.h:2039
constexpr AudioRef(AudioRef &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:2085
AudioRef & operator=(const AudioRef &other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:2094
constexpr AudioRef(const Audio &resource) noexcept
Constructs from Audio.
Definition: SDL3pp_mixer.h:2061
constexpr AudioRef(AudioRaw resource) noexcept
Constructs from raw Audio.
Definition: SDL3pp_mixer.h:2049
constexpr AudioRef(const AudioRef &other) noexcept
Copy constructor.
Definition: SDL3pp_mixer.h:2079
~AudioRef()
Destructor.
Definition: SDL3pp_mixer.h:2091
constexpr AudioRef(Audio &&resource) noexcept
Constructs from Audio.
Definition: SDL3pp_mixer.h:2073
Reference for AudioStream.
Definition: SDL3pp_audio.h:2941
Reference for Group.
Definition: SDL3pp_mixer.h:3935
constexpr GroupRef(GroupRaw resource) noexcept
Constructs from raw Group.
Definition: SDL3pp_mixer.h:3945
GroupRef & operator=(const GroupRef &other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:3990
constexpr GroupRef(GroupRef &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:3981
constexpr GroupRef(const Group &resource) noexcept
Constructs from Group.
Definition: SDL3pp_mixer.h:3957
~GroupRef()
Destructor.
Definition: SDL3pp_mixer.h:3987
constexpr GroupRef(const GroupRef &other) noexcept
Copy constructor.
Definition: SDL3pp_mixer.h:3975
constexpr GroupRef(Group &&resource) noexcept
Constructs from Group.
Definition: SDL3pp_mixer.h:3969
Reference for IOStream.
Definition: SDL3pp_iostream.h:1627
Definition: SDL3pp_callbackWrapper.h:169
Reference for Mixer.
Definition: SDL3pp_mixer.h:1349
constexpr MixerRef(MixerRaw resource) noexcept
Constructs from raw Mixer.
Definition: SDL3pp_mixer.h:1359
constexpr MixerRef(const MixerRef &other) noexcept
Copy constructor.
Definition: SDL3pp_mixer.h:1389
constexpr MixerRef(const Mixer &resource) noexcept
Constructs from Mixer.
Definition: SDL3pp_mixer.h:1371
constexpr MixerRef(Mixer &&resource) noexcept
Constructs from Mixer.
Definition: SDL3pp_mixer.h:1383
constexpr MixerRef(MixerRef &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:1395
MixerRef & operator=(const MixerRef &other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:1404
~MixerRef()
Destructor.
Definition: SDL3pp_mixer.h:1401
Reference for Properties.
Definition: SDL3pp_properties.h:687
Reference for Track.
Definition: SDL3pp_mixer.h:3600
constexpr TrackRef(TrackRef &&other) noexcept
Move constructor.
Definition: SDL3pp_mixer.h:3646
constexpr TrackRef(TrackRaw resource) noexcept
Constructs from raw Track.
Definition: SDL3pp_mixer.h:3610
TrackRef & operator=(const TrackRef &other) noexcept
Assignment operator.
Definition: SDL3pp_mixer.h:3655
constexpr TrackRef(const Track &resource) noexcept
Constructs from Track.
Definition: SDL3pp_mixer.h:3622
~TrackRef()
Destructor.
Definition: SDL3pp_mixer.h:3652
constexpr TrackRef(const TrackRef &other) noexcept
Copy constructor.
Definition: SDL3pp_mixer.h:3640
constexpr TrackRef(Track &&resource) noexcept
Constructs from Track.
Definition: SDL3pp_mixer.h:3634