43 lines
880 B
C++
43 lines
880 B
C++
/* -----------------------------------------------------------------------------
|
|
GSFramework
|
|
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
|
----------------------------------------------------------------------------- */
|
|
|
|
|
|
#ifndef __AUDIOSTREAMINTERFACE__
|
|
#define __AUDIOSTREAMINTERFACE__
|
|
|
|
|
|
#include "audio/sample_format.h"
|
|
|
|
|
|
namespace GS {
|
|
|
|
/*
|
|
@short Audio stream interface.
|
|
@author Emmanuel Julien (ejulien@nworks.fr)
|
|
*/
|
|
struct IAudioStream
|
|
{
|
|
SampleFormat format;
|
|
|
|
/// Return the stream data format (eg. "OGG").
|
|
virtual const char *GetFormat() = 0;
|
|
|
|
virtual bool Seek(int t_ms = 0) = 0;
|
|
virtual bool IsEOF() const = 0;
|
|
|
|
virtual size_t GetPCM(void *) = 0;
|
|
virtual size_t GetPCMBufferSize() const = 0;
|
|
|
|
virtual bool Open(const char *uri) = 0;
|
|
virtual void Close() = 0;
|
|
|
|
virtual ~IAudioStream() {}
|
|
};
|
|
|
|
} // GS
|
|
|
|
|
|
#endif // __AUDIOSTREAMINTERFACE__
|