TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
OggSoundStream.h
Go to the documentation of this file.
1#ifndef __OggSoundStream_h__
2#define __OggSoundStream_h__
3
4/***************************************************************************
5
6 file : OggSoundStream.h
7 created : Fri Dec 23 17:35:18 CET 2011
8 copyright : (C) 2011 Bernhard Wymann
9 email : berniw@bluewin.ch
10 version : $Id$
11
12 ***************************************************************************/
13
14/***************************************************************************
15 * *
16 * This program is free software; you can redistribute it and/or modify *
17 * it under the terms of the GNU General Public License as published by *
18 * the Free Software Foundation; either version 2 of the License, or *
19 * (at your option) any later version. *
20 * *
21 ***************************************************************************/
22
23/* Concrete implementation for ogg sound streams */
24
25#define OV_EXCLUDE_STATIC_CALLBACKS
26
27#include <vorbis/vorbisfile.h>
28#include "SoundStream.h"
29
31{
32 public:
33 OggSoundStream(char* path);
34 virtual ~OggSoundStream();
35
36 virtual int getRateInHz() { return rateInHz; }
37 virtual SoundFormat getSoundFormat() { return format; }
38
39 virtual bool read(char* buffer, const int bufferSize, int* resultSize, const char** error);
40 virtual void rewind();
41 virtual void display();
42 virtual bool isValid() { return valid; }
43
44 protected:
45
46 private:
47 const char* errorString(int code);
48
49 OggVorbis_File oggStream;
50 bool valid;
53};
54
55#endif // __OggSoundStream_h__
virtual ~OggSoundStream()
virtual void display()
virtual bool isValid()
virtual bool read(char *buffer, const int bufferSize, int *resultSize, const char **error)
virtual SoundFormat getSoundFormat()
const char * errorString(int code)
SoundFormat format
virtual int getRateInHz()
OggVorbis_File oggStream
OggSoundStream(char *path)
virtual void rewind()
SoundStream(const char *path)
Definition SoundStream.h:28