SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL::Group Struct Reference

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

Inheritance diagram for SDL::Group:
[legend]

Public Member Functions

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

Additional Inherited Members

Public Types inherited from SDL::ResourceBaseT< GroupRaw >
using RawPointer
 The underlying raw pointer type.
using RawConstPointer
 The underlying const raw pointer type.
Protected Member Functions inherited from SDL::ResourceBaseT< GroupRaw >
constexpr ~ResourceBaseT ()=default
 Destructor.
constexpr ResourceBaseToperator= (const ResourceBaseT &)=default
 Assignment operator.

Detailed Description

An opaque object that represents a grouping of tracks.

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()

SDL::Group::Group ( GroupRaw resource)
inlineexplicitconstexprnoexcept

Constructs from raw Group.

Parameters
resourcea GroupRaw to be wrapped.

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


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