TORCS  1.3.9
The Open Racing Car Simulator
SoundStream.h
Go to the documentation of this file.
1 #ifndef __SoundStream_h__
2 #define __SoundStream_h__
3 
4 /***************************************************************************
5 
6  file : SoundStream.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 /* Intherface for sound streams */
24 
26 {
27  public:
28  SoundStream(const char* path) {};
29  virtual ~SoundStream() {};
30 
31  enum SoundFormat {
35  };
36 
37  virtual int getRateInHz() = 0;
38  virtual SoundFormat getSoundFormat() = 0;
39 
40  virtual bool read(char* buffer, const int bufferSize, int* resultSize, const char** error) = 0;
41  virtual void rewind() = 0;
42  virtual void display() = 0;
43  // isValid is not nice, but I do not want to introduce exceptions into TORCS at this time
44  virtual bool isValid() = 0;
45 
46 };
47 
48 #endif // __SoundStream_h__
virtual void display()=0
virtual int getRateInHz()=0
virtual bool read(char *buffer, const int bufferSize, int *resultSize, const char **error)=0
virtual ~SoundStream()
Definition: SoundStream.h:29
SoundStream(const char *path)
Definition: SoundStream.h:28
virtual bool isValid()=0
virtual void rewind()=0
virtual SoundFormat getSoundFormat()=0