| 
                Last change
                  on this file since 1193 was
                  790,
                  checked in by nicolasc, 18 years ago
           | 
        
        
          | 
               
merged FICN back into trunk 
awaiting release. 
 
           | 
        
        | 
            File size:
            891 bytes
           | 
      
      
        
  | Line |   | 
|---|
| 1 | #ifndef _AudioStream_H__ | 
|---|
| 2 | #define _AudioStream_H__ | 
|---|
| 3 |  | 
|---|
| 4 | #include "AudioIncludes.h" | 
|---|
| 5 |  | 
|---|
| 6 | #include "AudioPrereqs.h" | 
|---|
| 7 |  | 
|---|
| 8 | namespace 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.