Changeset 677 for code/branches/FICN/src/audio
- Timestamp:
- Dec 23, 2007, 7:19:07 PM (17 years ago)
- Location:
- code/branches/FICN/src/audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/audio/AudioIncludes.h
r420 r677 12 12 13 13 #include "../orxonox/core/Error.h" 14 -
code/branches/FICN/src/audio/AudioStream.cc
r560 r677 105 105 { 106 106 COUT(3) 107 << "version " << vorbisInfo->version << "\n"108 << "channels " << vorbisInfo->channels << "\n"109 << "rate (hz) " << vorbisInfo->rate << "\n"110 << "bitrate upper " << vorbisInfo->bitrate_upper << "\n"111 << "bitrate nominal " << vorbisInfo->bitrate_nominal << "\n"112 << "bitrate lower " << vorbisInfo->bitrate_lower << "\n"113 << "bitrate window " << vorbisInfo->bitrate_window << "\n"114 << "\n"115 << "vendor " << vorbisComment->vendor << "\n";107 << "version " << vorbisInfo->version << std::endl 108 << "channels " << vorbisInfo->channels << std::endl 109 << "rate (hz) " << vorbisInfo->rate << std::endl 110 << "bitrate upper " << vorbisInfo->bitrate_upper << std::endl 111 << "bitrate nominal " << vorbisInfo->bitrate_nominal << std::endl 112 << "bitrate lower " << vorbisInfo->bitrate_lower << std::endl 113 << "bitrate window " << vorbisInfo->bitrate_window << std::endl 114 << std::endl 115 << "vendor " << vorbisComment->vendor << std::endl; 116 116 117 117 for(int i = 0; i < vorbisComment->comments; i++) 118 COUT(3) << " " << vorbisComment->user_comments[i] << "\n";118 COUT(3) << " " << vorbisComment->user_comments[i] << std::endl; 119 119 120 120 COUT(3) << std::endl; -
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.