Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/sound/ogg_player.h @ 4955

Last change on this file since 4955 was 4836, checked in by bensch, 19 years ago

orxonox/trunk: renamed all the \param → @param and so on in Doxygen tags.
Thanks a lot to the kDevelop team. this took since the last commit :)

File size: 899 bytes
Line 
1/*!
2 * @file ogg_player.h
3 *  Ogg-Player definition
4 */
5
6
7#ifndef _OGG_PLAYER_H
8#define _OGG_PLAYER_H
9
10#include <string>
11#include <iostream>
12using namespace std;
13
14#include <AL/al.h>
15#include <ogg/ogg.h>
16#include <vorbis/vorbisfile.h>
17
18
19
20#define BUFFER_SIZE (4096 * 4)
21
22
23
24class OggStream
25{
26    public:
27
28        void open(string path);
29        void release();
30        void display();
31        bool playback();
32        bool playing();
33        bool update();
34
35    protected:
36
37        bool stream(ALuint buffer);
38        void empty();
39        void check();
40        const char* errorString(int code);
41
42    private:
43
44        FILE*             oggFile;
45        OggVorbis_File    oggStream;
46        vorbis_info*      vorbisInfo;
47        vorbis_comment*   vorbisComment;
48
49        ALuint            buffers[2];
50        ALuint            source;
51        ALenum            format;
52};
53
54
55#endif /* _OGG_PLAYER_H */
Note: See TracBrowser for help on using the repository browser.