Removed unneeded macros in the examples
This commit is contained in:
parent
d3229b1c78
commit
37eab63fcd
|
@ -8,13 +8,6 @@
|
||||||
|
|
||||||
//Include cAudio.h so we can work wtih cAudio
|
//Include cAudio.h so we can work wtih cAudio
|
||||||
#include "cAudio.h"
|
#include "cAudio.h"
|
||||||
#if defined(CAUDIO_COMILER_MINGW)
|
|
||||||
// do nothing
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT##_soundName_
|
|
||||||
#else
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT#_soundName_
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -52,26 +45,11 @@ int main(int argc, char* argv[]) {
|
||||||
pDeviceList = 0;
|
pDeviceList = 0;
|
||||||
|
|
||||||
//Create a IAudio object and load a sound from a file
|
//Create a IAudio object and load a sound from a file
|
||||||
|
cAudio::IAudioSource* mysound = audioMgr->create("song", "../Media/cAudioTheme1.ogg",true);
|
||||||
#if defined(CAUDIO_COMPILER_MINGW)
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", "../Media/cAudioTheme1.ogg",true);
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE("cAudioTheme1.ogg"),true);
|
|
||||||
#else
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE(cAudioTheme1.ogg),true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (size_t i=0; i<10; i++)
|
for (size_t i=0; i<10; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
#if defined(CAUDIO_COMPILER_MINGW)
|
|
||||||
audioMgr->play2D("../Media/bling.ogg");
|
audioMgr->play2D("../Media/bling.ogg");
|
||||||
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
audioMgr->play2D(AUDIO_FILE("bling.ogg"));
|
|
||||||
#else
|
|
||||||
audioMgr->play2D(AUDIO_FILE(bling.ogg));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mysound)
|
if(mysound)
|
||||||
|
|
|
@ -9,14 +9,6 @@
|
||||||
|
|
||||||
//Include cAudio.h so we can work wtih cAudio
|
//Include cAudio.h so we can work wtih cAudio
|
||||||
#include "cAudio.h"
|
#include "cAudio.h"
|
||||||
#if defined(CAUDIO_COMILER_MINGW)
|
|
||||||
// do nothing
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT##_soundName_
|
|
||||||
#else
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT#_soundName_
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -61,14 +53,7 @@ int main(int argc, char* argv[])
|
||||||
cAudio::IListener* listener = audioMgr->getListener();
|
cAudio::IListener* listener = audioMgr->getListener();
|
||||||
|
|
||||||
//Create a IAudio object and load a sound from a file
|
//Create a IAudio object and load a sound from a file
|
||||||
|
|
||||||
#if defined(CAUDIO_COMPILER_MINGW)
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", "../Media/bling.ogg",true);
|
cAudio::IAudioSource* mysound = audioMgr->create("bling", "../Media/bling.ogg",true);
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE("bling.ogg"),true);
|
|
||||||
#else
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE(bling.ogg),true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//Set the IAudio Sound to play3d and loop
|
//Set the IAudio Sound to play3d and loop
|
||||||
//play3d takes 4 arguments play3d(toloop,x,y,z,strength)
|
//play3d takes 4 arguments play3d(toloop,x,y,z,strength)
|
||||||
|
|
|
@ -9,14 +9,6 @@
|
||||||
|
|
||||||
//Include cAudio.h so we can work wtih cAudio
|
//Include cAudio.h so we can work wtih cAudio
|
||||||
#include "cAudio.h"
|
#include "cAudio.h"
|
||||||
#if defined(CAUDIO_COMILER_MINGW)
|
|
||||||
// do nothing
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT##_soundName_
|
|
||||||
#else
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT#_soundName_
|
|
||||||
#endif
|
|
||||||
//Our Bling sound
|
|
||||||
#include "bling.h"
|
#include "bling.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -7,13 +7,6 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
//Include cAudio.h so we can work wtih cAudio
|
//Include cAudio.h so we can work wtih cAudio
|
||||||
#include "cAudio.h"
|
#include "cAudio.h"
|
||||||
#if defined(CAUDIO_COMILER_MINGW)
|
|
||||||
// do nothing
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT##_soundName_
|
|
||||||
#else
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT#_soundName_
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,6 @@
|
||||||
|
|
||||||
///Include cAudio.h so we can work wtih cAudio
|
///Include cAudio.h so we can work wtih cAudio
|
||||||
#include "cAudio.h"
|
#include "cAudio.h"
|
||||||
#if defined(CAUDIO_COMILER_MINGW)
|
|
||||||
// do nothing
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT##_soundName_
|
|
||||||
#else
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT#_soundName_
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -65,13 +58,7 @@ int main(int argc, char* argv[])
|
||||||
filter->setLowFrequencyVolume(0.1f);
|
filter->setLowFrequencyVolume(0.1f);
|
||||||
|
|
||||||
//Create a IAudio object and load a sound from a file
|
//Create a IAudio object and load a sound from a file
|
||||||
#if defined(CAUDIO_COMPILER_MINGW)
|
cAudio::IAudioSource* mysound = audioMgr->create("footsteps", "../Media/Footsteps.wav",true);
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", "../Media/Footsteps.wav",true);
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE("Footsteps.wav"),true);
|
|
||||||
#else
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE(Footsteps.wav),true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(mysound)
|
if(mysound)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,13 +8,6 @@
|
||||||
|
|
||||||
//Include cAudio.h so we can work wtih cAudio
|
//Include cAudio.h so we can work wtih cAudio
|
||||||
#include "cAudio.h"
|
#include "cAudio.h"
|
||||||
#if defined(CAUDIO_COMILER_MINGW)
|
|
||||||
// do nothing
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT##_soundName_
|
|
||||||
#else
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT#_soundName_
|
|
||||||
#endif
|
|
||||||
//Include the custom handler
|
//Include the custom handler
|
||||||
#include "cTestHandler.h"
|
#include "cTestHandler.h"
|
||||||
|
|
||||||
|
@ -58,13 +51,8 @@ int main(int argc, char* argv[])
|
||||||
pDeviceList = 0;
|
pDeviceList = 0;
|
||||||
|
|
||||||
//Create a IAudio object and load a sound from a file
|
//Create a IAudio object and load a sound from a file
|
||||||
#if defined(CAUDIO_COMPILER_MINGW)
|
cAudio::IAudioSource* mysound = audioMgr->create("song", "../Media/cAudioTheme1.ogg",true);
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", "../Media/cAudioTheme1.ogg",true);
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE("cAudioTheme1.ogg"),true);
|
|
||||||
#else
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE(cAudioTheme1.ogg),true);
|
|
||||||
#endif
|
|
||||||
mysound->registerEventHandler(handle);
|
mysound->registerEventHandler(handle);
|
||||||
|
|
||||||
if(mysound)
|
if(mysound)
|
||||||
|
|
|
@ -8,13 +8,6 @@
|
||||||
|
|
||||||
//Include cAudio.h so we can work wtih cAudio
|
//Include cAudio.h so we can work wtih cAudio
|
||||||
#include "cAudio.h"
|
#include "cAudio.h"
|
||||||
#if defined(CAUDIO_COMILER_MINGW)
|
|
||||||
// do nothing
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT##_soundName_
|
|
||||||
#else
|
|
||||||
# define AUDIO_FILE(_soundName_) CAUDIO_MEDIA_ROOT#_soundName_
|
|
||||||
#endif
|
|
||||||
//Include the new log receiver
|
//Include the new log receiver
|
||||||
#include "cTestLogReceiver.h"
|
#include "cTestLogReceiver.h"
|
||||||
|
|
||||||
|
@ -65,13 +58,8 @@ int main(int argc, char* argv[])
|
||||||
pDeviceList = 0;
|
pDeviceList = 0;
|
||||||
|
|
||||||
//Create a IAudio object and load a sound from a file
|
//Create a IAudio object and load a sound from a file
|
||||||
#if defined(CAUDIO_COMPILER_MINGW)
|
cAudio::IAudioSource* mysound = audioMgr->create("song", "../Media/cAudioTheme1.ogg",true);
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", "../Media/cAudioTheme1.ogg",true);
|
|
||||||
#elif defined(CAUDIO_PLATFORM_WIN)
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE("cAudioTheme1.ogg"),true);
|
|
||||||
#else
|
|
||||||
cAudio::IAudioSource* mysound = audioMgr->create("bling", AUDIO_FILE(cAudioTheme1.ogg),true);
|
|
||||||
#endif
|
|
||||||
if(mysound)
|
if(mysound)
|
||||||
{
|
{
|
||||||
mysound->setVolume(0.5);
|
mysound->setVolume(0.5);
|
||||||
|
|
Loading…
Reference in New Issue