From 24d20c74b8e02ad7b7575ab8f577880f98e43655 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 15 Jun 2003 12:47:05 +0000 Subject: just a check-in before i lose that because of my fscking harddrive... this is work-in-progress... --- (limited to 'libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp') diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp new file mode 100644 index 0000000..79bf327 --- a/dev/null +++ b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp @@ -0,0 +1,32 @@ +#include + +int main( int argc, char** argv ) +{ + qDebug( "OPIE Sound System Demo" ); + + OSoundSystem* sound = OSoundSystem::instance(); + + OSoundSystem::CardIterator it = sound->iterator(); +/* + while ( it.current() ) + { + qDebug( "DEMO: OSoundSystem contains Interface '%s'", (const char*) it.current()->name() ); + ++it; + } + +*/ + OSoundCard* card = it.current(); + + OMixerInterface* mixer = card->mixer(); + + QStringList channels = mixer->allChannels(); + + for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it ) + { + qDebug( "OSSDEMO: Mixer has channel %s", (const char*) *it ); + qDebug( "OSSDEMO: +--- volume %d (left) | %d (right)", mixer->volume( *it ) & 0xff, mixer->volume( *it ) >> 8 ); + } + + return 0; + +} -- cgit v0.9.0.2