Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 674 was 673, checked in by rgrieder, 17 years ago
  • deleted obsolete classes: BaseEntity, Entity, Light and SceneNode (please complain if not agreed)
  • improved include guard naming consistency
File size: 906 bytes
Line 
1#ifndef _AudioStream_H__
2#define _AudioStream_H__
3
4#include "AudioIncludes.h"
5
6namespace audio
7{
8        #define BUFFER_SIZE (4096 * 4)
9       
10        class AudioStream
11        {
12            public:
13                                        AudioStream(std::string path);
14                void open();
15                void release();
16                void display();
17                bool playback();
18                bool playing();
19                bool update();
20                                        inline bool isLoaded() { return loaded; }       
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                                        std::string path;
32
33                FILE*           oggFile;
34                OggVorbis_File  oggStream;
35                vorbis_info*    vorbisInfo;
36                vorbis_comment* vorbisComment;
37                                        bool loaded;   
38
39                ALuint buffers[2];
40                ALuint source;
41                ALenum format;
42        };
43}
44
45#endif /* _AudioStream_H__ */
Note: See TracBrowser for help on using the repository browser.