Removed unneeded macros in the examples

This commit is contained in:
Raynaldo Rivera 2014-09-02 09:38:39 -07:00
parent d3229b1c78
commit 37eab63fcd
7 changed files with 6 additions and 95 deletions

View File

@ -8,13 +8,6 @@
//Include cAudio.h so we can work wtih cAudio
#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;
@ -52,26 +45,11 @@ int main(int argc, char* argv[]) {
pDeviceList = 0;
//Create a IAudio object and load a sound from a file
#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
cAudio::IAudioSource* mysound = audioMgr->create("song", "../Media/cAudioTheme1.ogg",true);
for (size_t i=0; i<10; i++)
{
#if defined(CAUDIO_COMPILER_MINGW)
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)

View File

@ -9,14 +9,6 @@
//Include cAudio.h so we can work wtih cAudio
#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;
@ -61,14 +53,7 @@ int main(int argc, char* argv[])
cAudio::IListener* listener = audioMgr->getListener();
//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);
#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
//play3d takes 4 arguments play3d(toloop,x,y,z,strength)

View File

@ -9,14 +9,6 @@
//Include cAudio.h so we can work wtih cAudio
#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"
using namespace std;

View File

@ -7,13 +7,6 @@
#include <string>
//Include cAudio.h so we can work wtih cAudio
#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;

View File

@ -8,13 +8,6 @@
///Include cAudio.h so we can work wtih cAudio
#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;
@ -65,13 +58,7 @@ int main(int argc, char* argv[])
filter->setLowFrequencyVolume(0.1f);
//Create a IAudio object and load a sound from a file
#if defined(CAUDIO_COMPILER_MINGW)
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
cAudio::IAudioSource* mysound = audioMgr->create("footsteps", "../Media/Footsteps.wav",true);
if(mysound)
{

View File

@ -8,13 +8,6 @@
//Include cAudio.h so we can work wtih cAudio
#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 "cTestHandler.h"
@ -58,13 +51,8 @@ int main(int argc, char* argv[])
pDeviceList = 0;
//Create a IAudio object and load a sound from a file
#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
cAudio::IAudioSource* mysound = audioMgr->create("song", "../Media/cAudioTheme1.ogg",true);
mysound->registerEventHandler(handle);
if(mysound)

View File

@ -8,13 +8,6 @@
//Include cAudio.h so we can work wtih cAudio
#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 "cTestLogReceiver.h"
@ -65,13 +58,8 @@ int main(int argc, char* argv[])
pDeviceList = 0;
//Create a IAudio object and load a sound from a file
#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
cAudio::IAudioSource* mysound = audioMgr->create("song", "../Media/cAudioTheme1.ogg",true);
if(mysound)
{
mysound->setVolume(0.5);