RioEngine  0.1
My first attempt to create a 3D WYSIWYG Game Engine
ik_IAudioStream.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2014 Nikolaus Gebhardt
2 // This file is part of the "irrKlang" library.
3 // For conditions of distribution and use, see copyright notice in irrKlang.h
4 
5 #ifndef __I_IRRKLANG_AUDIO_STREAM_H_INCLUDED__
6 #define __I_IRRKLANG_AUDIO_STREAM_H_INCLUDED__
7 
8 #include "ik_IRefCounted.h"
10 
11 namespace irrklang
12 {
13 
14 
16 class IAudioStream : public IRefCounted
17 {
18 public:
19 
21  virtual ~IAudioStream() {};
22 
24  virtual SAudioStreamFormat getFormat() = 0;
25 
27 
31  virtual bool setPosition(ik_s32 pos) = 0;
32 
34  /* Some file formats like (MODs) don't support seeking */
35  virtual bool getIsSeekingSupported() { return true; }
36 
38 
42  virtual ik_s32 readFrames(void* target, ik_s32 frameCountToRead) = 0;
43 };
44 
45 
46 } // end namespace irrklang
47 
48 #endif
49 
structure describing an audio stream format with helper functions
Base class of most objects of the irrKlang.
Reads and decodes audio data into an usable audio stream for the ISoundEngine.
signed int ik_s32
32 bit signed variable.
Everything in the irrKlang Sound Engine can be found in this namespace.
virtual SAudioStreamFormat getFormat()=0
returns format of the audio stream
virtual ik_s32 readFrames(void *target, ik_s32 frameCountToRead)=0
tells the audio stream to read frameCountToRead audio frames into the specified buffer ...
virtual ~IAudioStream()
destructor
virtual bool getIsSeekingSupported()
returns true if the audio stream is seekable
virtual bool setPosition(ik_s32 pos)=0
sets the position of the audio stream.