forked from mirror/openmw-tes3mp
69e8f9c9db
- renamed imp_client/ to clients/ and ditto for servers/ - renamed imp/ to servers/ - renamed stream/input.h to stream/stream.h - renamed Stream::InputStream to Stream::Stream - updated various tests and makefiles - NOT TESTED YET
35 lines
910 B
C++
35 lines
910 B
C++
#ifndef MANGLE_STREAM_AUDIERECLIENT_H
|
|
#define MANGLE_STREAM_AUDIERECLIENT_H
|
|
|
|
#include <audiere.h>
|
|
#include <assert.h>
|
|
#include "iwrapper.h"
|
|
|
|
namespace Mangle {
|
|
namespace Stream {
|
|
|
|
/** @brief An Audiere::File that wraps a Mangle::Stream input.
|
|
|
|
This lets Audiere read sound files from any generic archive or
|
|
file manager that supports Mangle streams.
|
|
*/
|
|
class AudiereFile : public audiere::RefImplementation<audiere::File>, _SWrapper
|
|
{
|
|
public:
|
|
AudiereFile(Stream *inp, bool autoDel=false)
|
|
: _SWrapper(inp, autoDel) {}
|
|
|
|
/// Read 'count' bytes, return bytes successfully read
|
|
int read(void *buf, int count)
|
|
{ return inp->read(buf,count); }
|
|
|
|
/// Seek, relative to specified seek mode. Returns true if successful.
|
|
bool seek(int pos, audiere::File::SeekMode mode);
|
|
|
|
/// Get current position
|
|
int tell()
|
|
{ assert(inp->hasPosition); return inp->tell(); }
|
|
};
|
|
|
|
}} // namespaces
|
|
#endif
|