00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <gluon/audio/sound.h>
00023 #include <gluon/audio/engine.h>
00024
00025 #include <QDebug>
00026
00027 int main( int argc, char* argv[] )
00028 {
00029 GluonAudio::Engine::instance();
00030
00031 GluonAudio::Sound* left = new GluonAudio::Sound( "/usr/share/gluon/audio/sounds/Front_Left.wav" );
00032 GluonAudio::Sound* right = new GluonAudio::Sound( "/usr/share/gluon/audio/sounds/Front_Right.wav" );
00033 GluonAudio::Sound* center = new GluonAudio::Sound( "/usr/share/gluon/audio/sounds/Front_Center.wav" );
00034
00035 left->setPosition( -1, 0, 0 );
00036 right->setPosition( 1, 0, 0 );
00037
00038 qDebug() << "Playing left. Press enter to continue.";
00039 left->play();
00040 QTextStream(stdin).readLine();
00041
00042 qDebug() << "Playing right. Press enter to continue.";
00043 right->play();
00044 QTextStream(stdin).readLine();
00045
00046 qDebug() << "Playing center. Press enter to continue.";
00047 center->play();
00048 QTextStream(stdin).readLine();
00049
00050 delete left;
00051 delete right;
00052 delete center;
00053
00054 GluonAudio::Engine::close();
00055 }