summaryrefslogtreecommitdiff
path: root/libopie2/examples
Side-by-side diff
Diffstat (limited to 'libopie2/examples') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/examples/config.in6
-rw-r--r--libopie2/examples/examples.pro2
-rw-r--r--libopie2/examples/opiemm/.cvsignore6
-rw-r--r--libopie2/examples/opiemm/opiemm.pro3
-rw-r--r--libopie2/examples/opiemm/osoundsystemdemo/.cvsignore6
-rw-r--r--libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp32
-rw-r--r--libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro12
7 files changed, 63 insertions, 4 deletions
diff --git a/libopie2/examples/config.in b/libopie2/examples/config.in
index d18e479..478a822 100644
--- a/libopie2/examples/config.in
+++ b/libopie2/examples/config.in
@@ -3,4 +3,4 @@
default "n"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2NET && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2UI
- comment "the examples need a libqpe, libopie2core, libopie2db, libopie2net, libopie2pim and libopie2ui"
- depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2NET && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2UI)
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2NET && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2UI && LIBOPIE2MM
+ comment "the examples need a libqpe, libopie2core, libopie2db, libopie2net, libopie2pim, libopie2ui and libopie2mm"
+ depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2NET && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2UI && LIBOPIE2MM)
diff --git a/libopie2/examples/examples.pro b/libopie2/examples/examples.pro
index 2ae7eb7..8add40d 100644
--- a/libopie2/examples/examples.pro
+++ b/libopie2/examples/examples.pro
@@ -1,3 +1,3 @@
TEMPLATE = subdirs
-unix:SUBDIRS = opieui opienet opiecore
+unix:SUBDIRS = opieui opienet opiecore opiemm
diff --git a/libopie2/examples/opiemm/.cvsignore b/libopie2/examples/opiemm/.cvsignore
new file mode 100644
index 0000000..8f7300c
--- a/dev/null
+++ b/libopie2/examples/opiemm/.cvsignore
@@ -0,0 +1,6 @@
+Makefile*
+moc*
+*moc
+*.o
+~*
+
diff --git a/libopie2/examples/opiemm/opiemm.pro b/libopie2/examples/opiemm/opiemm.pro
new file mode 100644
index 0000000..0522ebe
--- a/dev/null
+++ b/libopie2/examples/opiemm/opiemm.pro
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+SUBDIRS = osoundsystemdemo
+
diff --git a/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore b/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore
new file mode 100644
index 0000000..8f7300c
--- a/dev/null
+++ b/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore
@@ -0,0 +1,6 @@
+Makefile*
+moc*
+*moc
+*.o
+~*
+
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 <opie2/osoundsystem.h>
+
+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;
+
+}
diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro
new file mode 100644
index 0000000..ba66165
--- a/dev/null
+++ b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro
@@ -0,0 +1,12 @@
+TEMPLATE = app
+CONFIG = qt warn_on debug
+HEADERS =
+SOURCES = osoundsystemdemo.cpp
+INCLUDEPATH += $(OPIEDIR)/include
+DEPENDPATH += $(OPIEDIR)/include
+LIBS += -lopiecore2 -lopiemm2
+TARGET = osoundsystemdemo
+MOC_DIR = moc
+OBJECTS_DIR = obj
+
+include ( $(OPIEDIR)/include.pro )