00001 // Copyright (C) 2002-2018 Nikolaus Gebhardt 00002 // This file is part of the "irrKlang" library. 00003 // For conditions of distribution and use, see copyright notice in irrKlang.h 00004 00005 #ifndef __I_IRRKLANG_AUDIO_STREAM_H_INCLUDED__ 00006 #define __I_IRRKLANG_AUDIO_STREAM_H_INCLUDED__ 00007 00008 #include "ik_IRefCounted.h" 00009 #include "ik_SAudioStreamFormat.h" 00010 00011 namespace irrklang 00012 { 00013 00014 00016 class IAudioStream : public IRefCounted 00017 { 00018 public: 00019 00021 virtual ~IAudioStream() {}; 00022 00024 virtual SAudioStreamFormat getFormat() = 0; 00025 00027 00031 virtual bool setPosition(ik_s32 pos) = 0; 00032 00034 /* Some file formats like (MODs) don't support seeking */ 00035 virtual bool getIsSeekingSupported() { return true; } 00036 00038 00042 virtual ik_s32 readFrames(void* target, ik_s32 frameCountToRead) = 0; 00043 }; 00044 00045 00046 } // end namespace irrklang 00047 00048 #endif 00049