Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 423 was 423, checked in by nicolape, 16 years ago
File size: 883 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                                        inline bool isLoaded() { return loaded; }       
22
23            protected:
24       
25                bool stream(ALuint buffer);
26                void empty();
27                void check();
28                std::string errorString(int code);
29       
30            private:
31       
32                FILE*           oggFile;
33                OggVorbis_File  oggStream;
34                vorbis_info*    vorbisInfo;
35                vorbis_comment* vorbisComment;
36                                        bool loaded;   
37
38                ALuint buffers[2];
39                ALuint source;
40                ALenum format;
41        };
42}
43
44#endif // __ogg_h__
Note: See TracBrowser for help on using the repository browser.