cAudio 2.3.0
3d Audio Engine
Loading...
Searching...
No Matches
cMemorySource.h
1// Copyright (c) 2008-2011 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones, Murat (wolfmanfx) Sari
2// This file is part of the "cAudio Engine"
3// For conditions of distribution and use, see copyright notice in cAudio.h
4
5#pragma once
6
7#include "IDataSource.h"
8#include "cMemoryOverride.h"
9
10namespace cAudio
11{
14 {
15 public:
21 cMemorySource(const void* data, int size, bool copy);
23
24 virtual bool isValid();
25 virtual int getCurrentPos();
26 virtual int getSize();
27 virtual int read(void* output, int size);
28 virtual bool seek(int amount, bool relative);
29 protected:
30 char* Data;
31 int Size;
32 bool Valid;
33 int Pos;
34 };
35};
Interface for data providers in cAudio.
Definition: IDataSource.h:13
Overrides the memory allocations for classes derived from it and makes them use the cAudio memory sys...
Class used to read from a memory buffer.
Definition: cMemorySource.h:14
virtual bool seek(int amount, bool relative)
Seek to a position in the data stream.
virtual int read(void *output, int size)
Reads out a section of the data stream.
virtual int getCurrentPos()
Returns the current location in the data stream.
virtual bool isValid()
Returns whether the source is valid.
virtual int getSize()
Returns the total size of the data stream.
Main namespace for the entire cAudio library.
Definition: cAudioCapture.h:16