Last change
on this file since 712 was
708,
checked in by rgrieder, 18 years ago
|
- added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files
(each of them contains #include <string> … typedef std::string String , etc.)
- please use String from now on by including <misc/String.h"
- removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
- adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
- moved usleep hack to misc/Sleep.h
- relative include paths for files from other root directories (like misc, network, etc.)
(but it stills writes "../Orxonox.h" when in folder orxonox/objects)
- "OgreSceneManager.h" —> <OgreSceneManager.h>
- included OrxonoxPrereqs in every file in folder orxonox
- moved HUD and ParticleInterface to namespace orxonox
- removed some using namespace Ogre/std when appropriate
- I hope I haven't forgotten important points..
|
File size:
863 bytes
|
Rev | Line | |
---|
[673] | 1 | #ifndef _AudioStream_H__ |
---|
| 2 | #define _AudioStream_H__ |
---|
[410] | 3 | |
---|
| 4 | #include "AudioIncludes.h" |
---|
| 5 | |
---|
| 6 | namespace audio |
---|
| 7 | { |
---|
[677] | 8 | #define BUFFER_SIZE (4096 * 4) |
---|
[423] | 9 | |
---|
[677] | 10 | class AudioStream |
---|
| 11 | { |
---|
| 12 | public: |
---|
[708] | 13 | AudioStream(orxonox::String path); |
---|
[677] | 14 | void open(); |
---|
| 15 | void release(); |
---|
| 16 | void display(); |
---|
| 17 | bool playback(); |
---|
| 18 | bool playing(); |
---|
| 19 | bool update(); |
---|
| 20 | inline bool isLoaded() { return loaded; } |
---|
[430] | 21 | |
---|
[677] | 22 | protected: |
---|
| 23 | bool stream(ALuint buffer); |
---|
| 24 | void empty(); |
---|
| 25 | void check(); |
---|
[708] | 26 | orxonox::String errorString(int code); |
---|
[423] | 27 | |
---|
[677] | 28 | private: |
---|
[708] | 29 | orxonox::String path; |
---|
[677] | 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 | }; |
---|
[410] | 41 | } |
---|
| 42 | |
---|
[673] | 43 | #endif /* _AudioStream_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.