From fbb77478c0005185e667a495495ceb57f3abf866 Mon Sep 17 00:00:00 2001 From: Nicolay Korslund Date: Fri, 1 Jan 2010 19:52:37 +0100 Subject: [PATCH] Updated vfs+sound test in root/tests/ --- tests/Makefile | 2 +- tests/ogrevfs_audiere_openal_test.cpp | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index ed680f3dba..d912c0784b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,7 +7,7 @@ L_OGRE=$(shell pkg-config --libs OGRE) L_OPENAL=$(shell pkg-config --libs openal) L_AUDIERE=-laudiere -ogrevfs_audiere_openal_test: ogrevfs_audiere_openal_test.cpp ../vfs/servers/ogre_vfs.cpp ../sound/servers/input_audiere.cpp ../sound/servers/output_openal.cpp ../stream/clients/audiere_file.cpp +ogrevfs_audiere_openal_test: ogrevfs_audiere_openal_test.cpp ../vfs/servers/ogre_vfs.cpp ../sound/sources/audiere_source.cpp ../sound/outputs/openal_out.cpp ../stream/clients/audiere_file.cpp $(GCC) $^ -o $@ $(I_OGRE) $(L_OGRE) $(L_OPENAL) $(L_AUDIERE) clean: diff --git a/tests/ogrevfs_audiere_openal_test.cpp b/tests/ogrevfs_audiere_openal_test.cpp index 810fd635e4..3e267c98ae 100644 --- a/tests/ogrevfs_audiere_openal_test.cpp +++ b/tests/ogrevfs_audiere_openal_test.cpp @@ -7,7 +7,7 @@ */ -#include "sound/servers/openal_audiere.h" +#include "sound/filters/openal_audiere.h" #include "vfs/servers/ogre_vfs.h" #include #include @@ -32,21 +32,18 @@ int main() // Ogre file system VFS::OgreVFS vfs; - Sound::OpenAL_Audiere_Manager mg; - Sound::Sound *snd = mg.load(vfs.open("owl.ogg")); + // The main sound system + Sound::OpenAL_Audiere_Factory mg; + Sound::SoundPtr snd = mg.load(vfs.open("owl.ogg")); - Sound::Instance *s = snd->getInstance(false, false); cout << "Playing 'owl.ogg' from 'sound.zip'\n"; - s->play(); + snd->play(); - while(s->isPlaying()) + while(snd->isPlaying()) { usleep(10000); if(mg.needsUpdate) mg.update(); } - if(s) s->drop(); - if(snd) snd->drop(); - return 0; }