|
CeresEngine 0.2.0
A game development framework
|
A audio clip is a small piece of audio that is entirely loaded into memory. More...
#include <CeresEngine/Audio/AudioResource.hpp>
Public Member Functions | |
| virtual const Samples & | getSamples () const =0 |
| AudioResourceType | getType () const final |
Public Member Functions inherited from CeresEngine::AbstractAudioResource | |
| virtual | ~AbstractAudioResource ()=default |
| virtual const AudioMetadata & | getMetadata () const =0 |
| 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 |
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. | |
A audio clip is a small piece of audio that is entirely loaded into memory.
In most cases, a clip is so small that it would not make sense (and even be slower!) to stream the audio in pieces.
Audio clips are most suitable for audio effects and tracks that are played frequently or multiple times.
| S | the audio sample type |
Implemented in CeresEngine::SimpleAudioClip.
|
finalvirtual |
Implements CeresEngine::AbstractAudioResource.