Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/audio/AudioStream.h @ 410

Last change on this file since 410 was 410, checked in by nicolape, 17 years ago

Added ogg streamer class

File size: 770 bytes
Line 
1#ifndef __ogg_h__
2#define __ogg_h__
3
4#include "AudioIncludes.h"
5
6namespace audio
7{
8        #define BUFFER_SIZE (4096 * 4)
9       
10        class AudioStream
11        {
12            public:
13       
14                void open(string path);
15                void release();
16                void display();
17                bool playback();
18                bool playing();
19                bool update();
20       
21            protected:
22       
23                bool stream(ALuint buffer);
24                void empty();
25                void check();
26                std::string errorString(int code);
27       
28            private:
29       
30                FILE*           oggFile;
31                OggVorbis_File  oggStream;
32                vorbis_info*    vorbisInfo;
33                vorbis_comment* vorbisComment;
34       
35                ALuint buffers[2];
36                ALuint source;
37                ALenum format;
38        };
39}
40
41#endif // __ogg_h__
Note: See TracBrowser for help on using the repository browser.