Changeset 677 for code/branches/FICN/src/audio/AudioStream.h
- Timestamp:
- Dec 23, 2007, 7:19:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/audio/AudioStream.h
r673 r677 6 6 namespace audio 7 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; } 8 #define BUFFER_SIZE (4096 * 4) 21 9 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; 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; } 32 21 33 FILE* oggFile; 34 OggVorbis_File oggStream;35 vorbis_info* vorbisInfo;36 vorbis_comment* vorbisComment;37 bool loaded; 22 protected: 23 bool stream(ALuint buffer); 24 void empty(); 25 void check(); 26 std::string errorString(int code); 38 27 39 ALuint buffers[2]; 40 ALuint source; 41 ALenum format; 42 }; 28 private: 29 std::string path; 30 31 FILE* oggFile; 32 OggVorbis_File oggStream; 33 vorbis_info* vorbisInfo; 34 vorbis_comment* vorbisComment; 35 bool loaded; 36 37 ALuint buffers[2]; 38 ALuint source; 39 ALenum format; 40 }; 43 41 } 44 42
Note: See TracChangeset
for help on using the changeset viewer.