SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::GroupRef Struct Reference

Reference for Group. More...

Inheritance diagram for SDL::GroupRef:
Inheritance graph
[legend]
Collaboration diagram for SDL::GroupRef:
Collaboration graph
[legend]

Public Member Functions

constexpr GroupRef (GroupRaw resource) noexcept
 Constructs from raw Group. More...
 
constexpr GroupRef (const Group &resource) noexcept
 Constructs from Group. More...
 
constexpr GroupRef (Group &&resource) noexcept
 Constructs from Group. More...
 
constexpr GroupRef (const GroupRef &other) noexcept
 Copy constructor.
 
constexpr GroupRef (GroupRef &&other) noexcept
 Move constructor.
 
 ~GroupRef ()
 Destructor.
 
GroupRefoperator= (const GroupRef &other) noexcept
 Assignment operator.
 
constexpr operator GroupRaw () const noexcept
 Converts to GroupRaw.
 
constexpr Group (std::nullptr_t=nullptr) noexcept
 Default ctor.
 
constexpr Group (GroupRaw resource) noexcept
 Constructs from raw Group. More...
 
constexpr Group (const Group &other) noexcept=delete
 Copy constructor.
 
constexpr Group (Group &&other) noexcept
 Move constructor.
 
constexpr Group (const GroupRef &other)=delete
 
constexpr Group (GroupRef &&other)=delete
 
 Group (MixerRef mixer)
 Create a mixing group. More...
 
- Public Member Functions inherited from SDL::Group
constexpr Group (std::nullptr_t=nullptr) noexcept
 Default ctor.
 
constexpr Group (GroupRaw resource) noexcept
 Constructs from raw Group. More...
 
constexpr Group (const Group &other) noexcept=delete
 Copy constructor.
 
constexpr Group (Group &&other) noexcept
 Move constructor.
 
constexpr Group (const GroupRef &other)=delete
 
constexpr Group (GroupRef &&other)=delete
 
 Group (MixerRef mixer)
 Create a mixing group. More...
 
 ~Group ()
 Destructor.
 
constexpr Groupoperator= (Group &&other) noexcept
 Assignment operator.
 
Groupoperator= (const Group &other)=delete
 Assignment operator.
 
constexpr GroupRaw get () const noexcept
 Retrieves underlying GroupRaw.
 
constexpr GroupRaw release () noexcept
 Retrieves underlying GroupRaw and clear this.
 
constexpr auto operator<=> (const Group &other) const noexcept=default
 Comparison.
 
constexpr operator bool () const noexcept
 Converts to bool.
 
void Destroy ()
 Destroy a mixing group. More...
 
PropertiesRef GetProperties ()
 Get the properties associated with a group. More...
 
MixerRef GetMixer ()
 Get the Mixer that owns a Group. More...
 
void SetPostMixCallback (GroupMixCallback cb, void *userdata)
 Set a callback that fires when a mixer group has completed mixing. More...
 

Detailed Description

This does not take ownership!

Constructor & Destructor Documentation

◆ GroupRef() [1/3]

constexpr SDL::GroupRef::GroupRef ( GroupRaw  resource)
inlineconstexprnoexcept
Parameters
resourcea GroupRaw.

This does not takes ownership!

◆ GroupRef() [2/3]

constexpr SDL::GroupRef::GroupRef ( const Group resource)
inlineconstexprnoexcept
Parameters
resourcea Group.

This does not takes ownership!

◆ GroupRef() [3/3]

constexpr SDL::GroupRef::GroupRef ( Group &&  resource)
inlineconstexprnoexcept
Parameters
resourcea Group.

This will release the ownership from resource!

Member Function Documentation

◆ Group() [1/2]

constexpr SDL::Group::Group ( GroupRaw  resource)
inlineexplicitconstexprnoexcept
Parameters
resourcea GroupRaw to be wrapped.

This assumes the ownership, call release() if you need to take back.

◆ Group() [2/2]

SDL::Group::Group ( MixerRef  mixer)
inline

Tracks are assigned to a mixing group (or if unassigned, they live in a mixer's internal default group). All tracks in a group are mixed together and the app can access this mixed data before it is mixed with all other groups to produce the final output.

This can be a useful feature, but is completely optional; apps can ignore mixing groups entirely and still have a full experience with SDL_mixer.

After creating a group, assign tracks to it with Track.SetGroup(). Use Group.SetPostMixCallback() to access the group's mixed data.

A mixing group can be destroyed with Group.Destroy() when no longer needed. Destroying the mixer will also destroy all its still-existing mixing groups.

Parameters
mixerthe mixer on which to create a mixing group.
Postcondition
a newly-created mixing group on success.
Exceptions
Erroron failure.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL_mixer 3.0.0.
See also
Group.Destroy
Track.SetGroup
Group.SetPostMixCallback

The documentation for this struct was generated from the following file: