Changeset 1494 for code/branches/network/src/audio/AudioStream.h
- Timestamp:
- May 31, 2008, 11:24:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/audio/AudioStream.h
- Property svn:eol-style set to native
r1056 r1494 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < 4 * 3 * > www.orxonox.net < * 5 4 * 6 5 * License notice: … … 27 26 */ 28 27 29 #ifndef _AudioStream_H__ 30 #define _AudioStream_H__ 31 28 #ifndef _AudioStream_H__#define _AudioStream_H__ 32 29 #include "AudioPrereqs.h" 33 30 … … 38 35 #include <vorbis/vorbisfile.h> 39 36 #include <vorbis/codec.h> 40 41 namespace audio 42 { 43 #define BUFFER_SIZE (4096 * 4) 44 45 class _AudioExport AudioStream 46 { 47 public: 48 AudioStream(std::string path); 49 void open(); 50 void release(); 51 void display(); 52 bool playback(); 53 bool playing(); 54 bool update(); 55 inline bool isLoaded() { return loaded; } 56 57 protected: 58 bool stream(ALuint buffer); 59 void empty(); 60 void check(); 61 std::string errorString(int code); 62 63 private: 64 std::string path; 65 66 FILE* oggFile; 67 OggVorbis_File oggStream; 68 vorbis_info* vorbisInfo; 69 vorbis_comment* vorbisComment; 70 bool loaded; 71 72 ALuint buffers[2]; 73 ALuint source; 74 ALenum format; 75 }; 76 } 77 78 #endif /* _AudioStream_H__ */ 37 namespace audio{ #define BUFFER_SIZE (4096 * 4) class _AudioExport AudioStream { public: AudioStream(std::string path); void open(); void release(); void display(); bool playback(); bool playing(); bool update(); inline bool isLoaded() { return loaded; } 38 protected: bool stream(ALuint buffer); void empty(); void check(); std::string errorString(int code); private: std::string path; 39 FILE* oggFile; OggVorbis_File oggStream; vorbis_info* vorbisInfo; vorbis_comment* vorbisComment; bool loaded; 40 ALuint buffers[2]; ALuint source; ALenum format; };}#endif /* _AudioStream_H__ */
Note: See TracChangeset
for help on using the changeset viewer.