5 #include "cMemorySource.h" 19 Data = (
char*)CAUDIO_MALLOC(Size);
21 memcpy(Data, data, Size);
32 cMemorySource::~cMemorySource()
58 memcpy(output, Data+Pos, size);
64 int extra = (Pos+size) - Size;
65 int copied = size - extra;
66 memcpy(output, Data+Pos, copied);
virtual bool seek(int amount, bool relative)
Seek to a position in the data stream.
cMemorySource(const void *data, int size, bool copy)
virtual int read(void *output, int size)
Reads out a section of the data stream.
virtual bool isValid()
Returns whether the source is valid.
virtual int getSize()
Returns the total size of the data stream.
virtual int getCurrentPos()
Returns the current location in the data stream.
Main namespace for the entire cAudio library.