Changeset 4961 in orxonox.OLD for orxonox/trunk/src/lib/sound/ogg_player.h
- Timestamp:
- Jul 28, 2005, 1:19:50 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/sound/ogg_player.h
r4836 r4961 1 1 /*! 2 2 * @file ogg_player.h 3 * 3 * Ogg-Player definition 4 4 */ 5 5 … … 8 8 #define _OGG_PLAYER_H 9 9 10 #include <string>11 10 #include <iostream> 12 11 using namespace std; 12 13 #include "base_object.h" 13 14 14 15 #include <AL/al.h> … … 21 22 22 23 24 // the definition of a Ogg-Player 25 class OggPlayer : public BaseObject 26 { 27 public: 28 OggPlayer(const char* fileName = NULL); 23 29 24 class OggStream 25 { 26 public: 30 void open(const char* fileName); 31 void release(); 32 void display(); 33 bool playback(); 34 bool playing(); 35 bool update(); 27 36 28 void open(string path); 29 void release(); 30 void display(); 31 bool playback(); 32 bool playing(); 33 bool update(); 37 protected: 34 38 35 protected: 39 bool stream(ALuint buffer); 40 void empty(); 41 void check(); 42 const char* errorString(int code); 36 43 37 bool stream(ALuint buffer); 38 void empty(); 39 void check(); 40 const char* errorString(int code); 44 private: 41 45 42 private: 46 FILE* oggFile; //!< general file-handler, to open the sound-file 47 OggVorbis_File oggStream; //!< The stream this Ogg-player is playing back 48 vorbis_info* vorbisInfo; //!< The information held in the opened ogg-file 49 vorbis_comment* vorbisComment; //!< Comments about the ogg-file 43 50 44 FILE* oggFile; 45 OggVorbis_File oggStream; 46 vorbis_info* vorbisInfo; 47 vorbis_comment* vorbisComment; 48 49 ALuint buffers[2]; 50 ALuint source; 51 ALenum format; 52 }; 51 ALuint buffers[2]; //!< buffers that handle sequentially buffering of the audio 52 ALuint source; //!< The source we play back on 53 ALenum format; //!< The format we play back 54 }; 53 55 54 56
Note: See TracChangeset
for help on using the changeset viewer.