NAP
Public Member Functions | Public Attributes | List of all members
AudioFileResource Class Reference

#include <audio/resource/audiofileresource.h>

Public Member Functions

 AudioFileResource (Core &core)
 
bool init (utility::ErrorState &errorState) override
 
- Public Member Functions inherited from AudioBufferResource
 AudioBufferResource (Core &)
 
float getSampleRate () const
 
DiscreteTimeValue getSize () const
 
unsigned int getChannelCount () const
 
SafePtr< MultiSampleBuffergetBuffer ()
 
DiscreteTimeValue toSamples (TimeValue milliseconds) const
 
TimeValue toMilliseconds (DiscreteTimeValue samples) const
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

std::string mAudioFilePath = ""
 property: 'AudioFilePath' The path to the audio file on disk More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 
- Protected Member Functions inherited from AudioBufferResource
void setSampleRate (float sampleRate)
 

Description

Loads an audio file from disk into memory.

Inheritance diagram for AudioFileResource:
[legend]
Collaboration diagram for AudioFileResource:
[legend]

Constructor & Destructor Documentation

◆ AudioFileResource()

AudioFileResource ( Core core)

Member Function Documentation

◆ init()

bool init ( utility::ErrorState errorState)
overridevirtual

Override this method to initialize the object after de-serialization. When called it is safe to assume that all dependencies have been resolved up to this point.

Parameters
errorStateshould contain the error message when initialization fails.
Returns
if initialization succeeded or failed.

Reimplemented from Object.

Member Data Documentation

◆ mAudioFilePath

std::string mAudioFilePath = ""

property: 'AudioFilePath' The path to the audio file on disk