Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 411 was 411, checked in by nicolape, 16 years ago

Some changes on streamer

File size: 818 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        #define STREAM_FILES_DIR "audio/ambient"
10       
11        class AudioStream
12        {
13            public:
14       
15                void open(std::string path);
16                void release();
17                void display();
18                bool playback();
19                bool playing();
20                bool update();
21       
22            protected:
23       
24                bool stream(ALuint buffer);
25                void empty();
26                void check();
27                std::string errorString(int code);
28       
29            private:
30       
31                FILE*           oggFile;
32                OggVorbis_File  oggStream;
33                vorbis_info*    vorbisInfo;
34                vorbis_comment* vorbisComment;
35       
36                ALuint buffers[2];
37                ALuint source;
38                ALenum format;
39        };
40}
41
42#endif // __ogg_h__
Note: See TracBrowser for help on using the repository browser.