![]() |
Jopnal Engine
alpha 0.4
Simple Component Based 2D/3D Game Engine
|
#include <SoundBuffer.hpp>
Public Types | |
| enum | AudioFormat { AudioFormat::undefined, AudioFormat::wav, AudioFormat::ogg } |
Public Member Functions | |
| SoundBuffer (const std::string &name) | |
| Constructor. More... | |
| SoundBuffer (const SoundBuffer &other, const std::string &newName) | |
| Copy constructor. More... | |
| ~SoundBuffer () override | |
| Destructor. More... | |
| bool | load (const std::string &path) |
| Load a new buffer from file. More... | |
| bool | load (const void *ptr, const uint32 size) |
| Load a new buffer from memory. More... | |
Public Member Functions inherited from jop::Resource | |
| Resource (const std::string &name) | |
| Constructor. More... | |
| virtual | ~Resource ()=0 |
| Virtual destructor. More... | |
| const std::string & | getName () const |
| Get the name of this resource. More... | |
| void | setPersistence (const unsigned short level) |
| Set the persistence level. More... | |
| unsigned short | getPersistence () const |
| Get the persistence level. More... | |
Public Member Functions inherited from jop::SafeReferenceable< Resource > | |
| WeakReference< Resource > | getReference () const |
| Get a weak reference to the bound object. More... | |
Public Member Functions inherited from jop::SerializeInfo | |
| SerializeInfo () | |
| void | setSerializePackage (const uint16 package) |
| uint16 | getSerializePackage () const |
| void | setShouldSerialize (const bool set) |
| bool | shouldSerialize () const |
| void | setLightSerializeable (const bool set) |
| bool | isLightSerializeable () const |
Static Public Member Functions | |
| static SoundBuffer & | getDefault () |
| Get default sound buffer. More... | |
Friends | |
| class | AudioReader |
| class | SoundEffect |
| class | SoundStream |
Additional Inherited Members | |
Protected Member Functions inherited from jop::Resource | |
| Resource (const Resource &other, const std::string &newName) | |
| Copy constructor. More... | |
Protected Member Functions inherited from jop::SafeReferenceable< Resource > | |
| SafeReferenceable (Resource *ref) | |
| Constructor. More... | |
| SafeReferenceable (SafeReferenceable< Resource > &&other) | |
| Move constructor. More... | |
| SafeReferenceable & | operator= (SafeReferenceable< Resource > &&other) |
| Move assignment operator. More... | |
| ~SafeReferenceable () | |
| Protected destructor. More... | |
Sound data storage
Definition at line 38 of file SoundBuffer.hpp.
|
strong |
| Enumerator | |
|---|---|
| undefined | |
| wav | |
| ogg | |
Definition at line 42 of file SoundBuffer.hpp.
| jop::SoundBuffer::SoundBuffer | ( | const std::string & | name | ) |
Constructor.
Initializes the internal buffer to be empty.
| name | Name of this resource |
| jop::SoundBuffer::SoundBuffer | ( | const SoundBuffer & | other, |
| const std::string & | newName | ||
| ) |
Copy constructor.
| other | The other buffer to be copied |
| newName | New name of this resource |
|
override |
Destructor.
|
static |
Get default sound buffer.
| bool jop::SoundBuffer::load | ( | const std::string & | path | ) |
Load a new buffer from file.
| path | Path for wanted resource |
| bool jop::SoundBuffer::load | ( | const void * | ptr, |
| const uint32 | size | ||
| ) |
Load a new buffer from memory.
| ptr | Pointer to data |
| size | Size if the data in bytes |
|
friend |
Definition at line 60 of file SoundBuffer.hpp.
|
friend |
Definition at line 61 of file SoundBuffer.hpp.
|
friend |
Definition at line 62 of file SoundBuffer.hpp.
1.8.11