X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fsound%2Fopenal_test2.cxx;h=da263620822fedeb0842ad0629faf6c464d8eae8;hb=8174005ac897f7042d71145201f139b67e08a5ce;hp=10884c59bea7d65276ca612e2f1fbb8c57ec8344;hpb=5bbcd386fa837885782f128af77ff0162761945c;p=simgear.git diff --git a/simgear/sound/openal_test2.cxx b/simgear/sound/openal_test2.cxx index 10884c59..da263620 100644 --- a/simgear/sound/openal_test2.cxx +++ b/simgear/sound/openal_test2.cxx @@ -1,4 +1,11 @@ #include +#ifdef __MINGW32__ +// This is broken, but allows the file to compile without a POSIX +// environment. +static unsigned int sleep(unsigned int secs) { return 0; } +#else +#include // sleep() +#endif #include "sample_openal.hxx" #include "soundmgr_openal.hxx" @@ -7,37 +14,37 @@ int main( int argc, char *argv[] ) { SGSoundMgr sm; - SGSoundSample sample1( ".", "jet.wav" ); + SGSoundSample sample1( SRC_DIR, "jet.wav" ); sample1.set_volume(0.5); sample1.set_volume(0.2); sample1.play_looped(); sleep(1); - SGSoundSample sample2( ".", "jet.wav" ); + SGSoundSample sample2( SRC_DIR, "jet.wav" ); sample2.set_volume(0.5); sample2.set_pitch(0.4); sample2.play_looped(); sleep(1); - SGSoundSample sample3( ".", "jet.wav" ); + SGSoundSample sample3( SRC_DIR, "jet.wav" ); sample3.set_volume(0.5); sample3.set_pitch(0.8); sample3.play_looped(); sleep(1); - SGSoundSample sample4( ".", "jet.wav" ); + SGSoundSample sample4( SRC_DIR, "jet.wav" ); sample4.set_volume(0.5); sample4.set_pitch(1.2); sample4.play_looped(); sleep(1); - SGSoundSample sample5( ".", "jet.wav" ); + SGSoundSample sample5( SRC_DIR, "jet.wav" ); sample5.set_volume(0.5); sample5.set_pitch(1.6); sample5.play_looped(); sleep(1); - SGSoundSample sample6( ".", "jet.wav" ); + SGSoundSample sample6( SRC_DIR, "jet.wav" ); sample6.set_volume(0.5); sample6.set_pitch(2.0); sample6.play_looped();