|
Untitled Game engine no.5
1.0
|
Struct to hold music data. More...
#include <Clip.hpp>
Public Member Functions | |
| void | playClip () |
| play the referenced Clip | |
| void | loopClip () |
| play the referenced Clip and loop it | |
| void | endClip () |
| end the referenced Clip | |
| ~Clip () | |
Static Public Member Functions | |
| static void | InitAudio () |
| static Ref< Clip > | LoadClip (const std::string &path) |
| static void | callback (void *userdata, Uint8 *stream, int len) |
| Callback passed into the SDL Audio library. More... | |
Public Attributes | |
| Uint32 | clipLen |
| Uint32 | trackPos = 0 |
| Uint8 * | data |
| SDL_AudioSpec | spec |
| bool | loop = false |
| bool | active = false |
Static Public Attributes | |
| static std::vector< Ref< Clip > > | sounds |
Struct to hold music data.
Includes looping and tracking of music position.
|
inline |
Deconstructor
Deletes the all stored audio buffer data.
|
inlinestatic |
Callback passed into the SDL Audio library.
Loops through all loaded sounds and mixes them together if they are active.
| userdata | not used |
| stream | audio buffer |
| len | length of the buffer |
|
inlinestatic |
Initialize global audio data.
| bool Engine::Clip::active = false |
is the clip playing or not
| Uint32 Engine::Clip::clipLen |
clip length
| Uint8* Engine::Clip::data |
audio data
| bool Engine::Clip::loop = false |
flag to set the clip looping
| SDL_AudioSpec Engine::Clip::spec |
audio specs
| Uint32 Engine::Clip::trackPos = 0 |
track position
1.8.17