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

An opaque object that represents a grouping of tracks. More...

Inheritance diagram for SDL::Group:
Inheritance graph
[legend]

Public Member Functions

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

SDL_mixer offers callbacks at various stages of the mixing pipeline to allow apps to view and manipulate data as it is transformed. Sometimes it is useful to hook in at a point where several tracks–but not all tracks– have been mixed. For example, when a game is in some options menu, perhaps adjusting game audio but not UI sounds could be useful.

SDL_mixer allows you to assign several tracks to a group, and receive a callback when that group has finished mixing, with a buffer of just that group's mixed audio, before it mixes into the final output.

Since
This datatype is available since SDL_mixer 3.0.0.
Category:
Resource

Constructor & Destructor Documentation

◆ Group()

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.


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