|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/Audio/AudioResource.hpp>
Public Member Functions | |
| SimpleAudioClip (AudioMetadata metadata, Samples samples) | |
| Creates a new audio clip. | |
| const AudioMetadata & | getMetadata () const override |
| const Samples & | getSamples () const override |
Public Member Functions inherited from CeresEngine::AudioClip | |
| AudioResourceType | getType () const final |
Public Member Functions inherited from CeresEngine::AbstractAudioResource | |
| virtual | ~AbstractAudioResource ()=default |
| bool | isClip () const |
| AudioClip & | asClip () |
| const AudioClip & | asClip () const |
| bool | isStream () const |
| AudioStream & | asStream () |
| const AudioStream & | asStream () const |
Public Member Functions inherited from CeresEngine::TResource< AudioClip > | |
| ResourceHandle< AudioClip > | getResourceHandle () const noexcept |
| Generates a hash for the provided type. | |
| SPtr< AudioClip > | getShared () noexcept |
| Gets a shared pointer to the resource. | |
| SPtr< const AudioClip > | getShared () const noexcept |
| Gets a shared pointer to the resource. | |
| const ResourceTypeInfo & | getResourceType () const noexcept override |
| Returns the resource type information descriptor. | |
| TResource (ResourceData &data, InputStream &dataStream) | |
| void | serialize (OutputStream &dataStream) const override |
Serializes a resource by writing data to dataStream. | |
Public Member Functions inherited from CeresEngine::Resource | |
| Resource () | |
Default constructor for the Resource class. | |
| Resource (ResourceData &data) | |
Creates a new Resource instance by passing a ResourceData instance. | |
| virtual | ~Resource () noexcept=default |
Resource virtual destructor. | |
| ResourceManager * | getResourceManager () const noexcept |
| HResource | getResourceHandle () const noexcept |
| Generates a hash for the provided type. | |
| UUID | getResourceID () const noexcept |
| HResource | getParentResource () const noexcept |
| A parent resource to which this resource is attached to. | |
| SPtr< ResourceMetadata > | getResourceMetadata () const noexcept |
| A pointer to the user-defined resource metadata. | |
| const PackagePtr & | getPackage () const noexcept |
| The package from which the resource was loaded from. | |
| template<typename T = Resource> | |
| SPtr< T > | getShared () noexcept |
| Gets a shared pointer to the resource. | |
| template<typename T = Resource> | |
| SPtr< const T > | getShared () const noexcept |
| Gets a shared pointer to the resource. | |
| Resource (ResourceData &data, InputStream &dataStream) | |
Creates a new resource by reading data from dataStream. | |
Public Member Functions inherited from CeresEngine::IReflectable | |
| virtual | ~IReflectable () noexcept=default |
Public Attributes | |
| AudioMetadata | metadata |
| The audio metadata object. | |
| Samples | samples |
| A vector containing the audio samples as 16 bit integers. | |
Additional Inherited Members | |
Public Types inherited from CeresEngine::AbstractAudioResource | |
| using | Sample = unsigned short |
| A audio sample type. | |
| using | Samples = Vector< Sample > |
| A collection of multiple audio samples. | |
| using | SampleIndex = unsigned int |
| A type representing the index of a sample. | |
| using | SampleOffset = int |
| A type representing a sample offset. | |
Static Public Member Functions inherited from CeresEngine::Resource | |
| template<typename Processor > | |
| static constexpr void | reflect (Processor &&RTTI) |
| Executes the given processor for every field of the struct. | |
Protected Member Functions inherited from CeresEngine::Resource | |
| HResourceStream | createStream (const ResourceStreamFlags &flags=ResourceStreamFlag::Default) |
| Creates a new resource stream. | |
| void | destroyStream (HResourceStream &stream) |
| Destroys a stream. | |
| void | markAsDirty () |
| Marks the resource as dirty. | |
| CeresEngine::SimpleAudioClip::SimpleAudioClip | ( | AudioMetadata | metadata, |
| Samples | samples | ||
| ) |
Creates a new audio clip.
| metadata | The audio metadata object |
| samples | A vector containing the audio samples as 16 bit integers |
|
overridevirtual |
Implements CeresEngine::AbstractAudioResource.
Implements CeresEngine::AudioClip.
| AudioMetadata CeresEngine::SimpleAudioClip::metadata |
The audio metadata object.
| Samples CeresEngine::SimpleAudioClip::samples |
A vector containing the audio samples as 16 bit integers.