1 #ifndef __blip__Asset_hpp 2 #define __blip__Asset_hpp 6 #include <commonc++/IOException.h++> 7 #include <commonc++/Stream.h++> 40 size_t read(byte_t* buf,
size_t count);
49 off_t
seek(off_t offset, ccxx::SeekMode mode);
79 CCXX_COPY_DECLS(
Asset);
84 #endif // __blip__Asset_hpp An asset manager, which provides access to the application's raw asset files.
Definition: AssetManager.hpp:34
off_t seek(off_t offset, ccxx::SeekMode mode)
Seek to a goven offset in the asset file.
Definition: Asset.cpp:44
off_t getBytesRemaining()
Get the number of bytes remaining to be read from the asset.
Definition: Asset.cpp:94
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
~Asset()
Destructor.
Definition: Asset.cpp:22
An application asset file.
Definition: Asset.hpp:23
off_t getLength()
Get the length of the asset file, in bytes.
Definition: Asset.cpp:86
bool isAllocated() const
Determine if the asset's internal buffer is allocated in ordinary RAM (as opposed to being memory-map...
Definition: Asset.cpp:102
size_t read(byte_t *buf, size_t count)
Read raw data from the asset file.
Definition: Asset.cpp:30
const byte_t * getBuffer()
If the asset has been read into an in-memory buffer, get a pointer to that buffer.
Definition: Asset.cpp:74