Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/tutorial/src/audio/AudioStream.h @ 859

Last change on this file since 859 was 859, checked in by landauf, 16 years ago

more or less a copy of the trunk

File size: 891 bytes
Line 
1#ifndef _AudioStream_H__
2#define _AudioStream_H__
3
4#include "AudioIncludes.h"
5
6#include "AudioPrereqs.h"
7
8namespace audio
9{
10  #define BUFFER_SIZE (4096 * 4)
11
12  class _AudioExport AudioStream
13  {
14    public:
15      AudioStream(std::string path);
16      void open();
17      void release();
18      void display();
19      bool playback();
20      bool playing();
21      bool update();
22      inline bool isLoaded() { return loaded; }
23
24    protected:
25      bool stream(ALuint buffer);
26      void empty();
27      void check();
28      std::string errorString(int code);
29
30    private:
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.