cAudio  2.3.0
3d Audio Engine
IDataSource.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 "IRefCounted.h"
8 
9 namespace cAudio
10 {
12  class IDataSource : public IRefCounted
13  {
14  public:
15  IDataSource() { }
16  virtual ~IDataSource() { }
17 
19 
21  virtual bool isValid() = 0;
22 
24  virtual int getCurrentPos() = 0;
25 
27  virtual int getSize() = 0;
28 
30 
34  virtual int read(void* output, int size) = 0;
35 
37 
41  virtual bool seek(int amount, bool relative) = 0;
42  };
43 };
44 
cAudio::IRefCounted
Applies reference counting to certain cAudio objects.
Definition: IRefCounted.h:13
cAudio::IDataSource::isValid
virtual bool isValid()=0
Returns whether the source is valid.
cAudio
Main namespace for the entire cAudio library.
Definition: cAudioCapture.h:16
cAudio::IDataSource::read
virtual int read(void *output, int size)=0
Reads out a section of the data stream.
cAudio::IDataSource::getSize
virtual int getSize()=0
Returns the total size of the data stream.
cAudio::IDataSource::getCurrentPos
virtual int getCurrentPos()=0
Returns the current location in the data stream.
cAudio::IDataSource::seek
virtual bool seek(int amount, bool relative)=0
Seek to a position in the data stream.
cAudio::IDataSource
Interface for data providers in cAudio.
Definition: IDataSource.h:13