cAudio 2.3.0
3d Audio Engine
Loading...
Searching...
No Matches
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
9namespace 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
Interface for data providers in cAudio.
Definition: IDataSource.h:13
virtual int read(void *output, int size)=0
Reads out a section of the data stream.
virtual bool seek(int amount, bool relative)=0
Seek to a position in the data stream.
virtual int getSize()=0
Returns the total size of the data stream.
virtual bool isValid()=0
Returns whether the source is valid.
virtual int getCurrentPos()=0
Returns the current location in the data stream.
Applies reference counting to certain cAudio objects.
Definition: IRefCounted.h:13
Main namespace for the entire cAudio library.
Definition: cAudioCapture.h:16