Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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