Changeset 1495 for code/branches/network/src/audio
- Timestamp:
- Jun 1, 2008, 1:10:46 AM (17 years ago)
- Location:
- code/branches/network/src/audio
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/audio/AudioBuffer.cc
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: -
code/branches/network/src/audio/AudioBuffer.h
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: -
code/branches/network/src/audio/AudioIncludes.h
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: … … 26 27 */ 27 28 28 /** @file @brief Various headers used in the audio lib. Avoid including this to increase accuracy of header file dependencies.*/ 29 /** 30 @file 31 @brief Various headers used in the audio lib. Avoid including this to 32 increase accuracy of header file dependencies. 33 */ 34 29 35 #include "AudioPrereqs.h" 30 36 -
code/branches/network/src/audio/AudioManager.cc
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: -
code/branches/network/src/audio/AudioManager.h
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: -
code/branches/network/src/audio/AudioPrereqs.h
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: … … 36 37 #include "util/OrxonoxPlatform.h" 37 38 38 //-----------------------------------------------------------------------// Shared library settings//-----------------------------------------------------------------------#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( AUDIO_STATIC_BUILD )# ifdef AUDIO_SHARED_BUILD# define _AudioExport __declspec(dllexport)# else# if defined( __MINGW32__ )# define _AudioExport# else# define _AudioExport __declspec(dllimport)# endif# endif#elif defined ( ORXONOX_GCC_VISIBILITY )# define _AudioExport __attribute__ ((visibility("default")))#else# define _AudioExport#endif 39 //-----------------------------------------------------------------------// Forward declarations//----------------------------------------------------------------------- 39 //----------------------------------------------------------------------- 40 // Shared library settings 41 //----------------------------------------------------------------------- 42 #if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( AUDIO_STATIC_BUILD ) 43 # ifdef AUDIO_SHARED_BUILD 44 # define _AudioExport __declspec(dllexport) 45 # else 46 # if defined( __MINGW32__ ) 47 # define _AudioExport 48 # else 49 # define _AudioExport __declspec(dllimport) 50 # endif 51 # endif 52 #elif defined ( ORXONOX_GCC_VISIBILITY ) 53 # define _AudioExport __attribute__ ((visibility("default"))) 54 #else 55 # define _AudioExport 56 #endif 57 58 59 //----------------------------------------------------------------------- 60 // Forward declarations 61 //----------------------------------------------------------------------- 40 62 namespace audio 41 63 { … … 46 68 } 47 69 48 //-----------------------------------------------------------------------// Warnings//----------------------------------------------------------------------- 70 //----------------------------------------------------------------------- 71 // Warnings 72 //----------------------------------------------------------------------- 49 73 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC 50 74 51 // set to 4: conversion from 'ogg_int64_t' to 'long', possible loss of data#pragma warning (4 : 4244)#endif 75 // set to 4: conversion from 'ogg_int64_t' to 'long', possible loss of data 76 #pragma warning (4 : 4244) 77 78 #endif 79 52 80 53 81 #endif /* _AudioPrereqs_H__ */ -
code/branches/network/src/audio/AudioSource.cc
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: -
code/branches/network/src/audio/AudioSource.h
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: -
code/branches/network/src/audio/AudioStream.h
r1494 r1495 1 1 /* 2 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * > www.orxonox.net < * 3 * > www.orxonox.net < 4 * 4 5 * 5 6 * License notice: … … 26 27 */ 27 28 28 #ifndef _AudioStream_H__#define _AudioStream_H__ 29 #ifndef _AudioStream_H__ 30 #define _AudioStream_H__ 31 29 32 #include "AudioPrereqs.h" 30 33 … … 35 38 #include <vorbis/vorbisfile.h> 36 39 #include <vorbis/codec.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__ */ 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__ */
Note: See TracChangeset
for help on using the changeset viewer.