Updated vfs+sound test in root/tests/

actorid
Nicolay Korslund 15 years ago
parent f8d3a35cf8
commit fbb77478c0

@ -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:

@ -7,7 +7,7 @@
*/
#include "sound/servers/openal_audiere.h"
#include "sound/filters/openal_audiere.h"
#include "vfs/servers/ogre_vfs.h"
#include <Ogre.h>
#include <iostream>
@ -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;
}

Loading…
Cancel
Save