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
25
class
SoundStream
26
{
27
public
:
28
SoundStream
(
const
char
* path) {};
29
virtual
~SoundStream
() {};
30
31
enum
SoundFormat
{
32
FORMAT_INVALID
,
33
FORMAT_MONO16
,
34
FORMAT_STEREO16
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__
SoundStream::display
virtual void display()=0
SoundStream::FORMAT_STEREO16
Definition:
SoundStream.h:34
SoundStream::getRateInHz
virtual int getRateInHz()=0
SoundStream::SoundFormat
SoundFormat
Definition:
SoundStream.h:31
SoundStream::read
virtual bool read(char *buffer, const int bufferSize, int *resultSize, const char **error)=0
SoundStream::~SoundStream
virtual ~SoundStream()
Definition:
SoundStream.h:29
SoundStream::FORMAT_MONO16
Definition:
SoundStream.h:33
SoundStream::FORMAT_INVALID
Definition:
SoundStream.h:32
SoundStream::SoundStream
SoundStream(const char *path)
Definition:
SoundStream.h:28
SoundStream::isValid
virtual bool isValid()=0
SoundStream::rewind
virtual void rewind()=0
SoundStream::getSoundFormat
virtual SoundFormat getSoundFormat()=0
SoundStream
Definition:
SoundStream.h:25
src
libs
musicplayer
SoundStream.h
Generated by
1.8.14