summaryrefslogtreecommitdiff
path: root/examples/opiemm
Unidiff
Diffstat (limited to 'examples/opiemm') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opiemm/opiemm.pro3
-rw-r--r--examples/opiemm/osoundsystemdemo/.cvsignore7
-rw-r--r--examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp66
-rw-r--r--examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro12
4 files changed, 88 insertions, 0 deletions
diff --git a/examples/opiemm/opiemm.pro b/examples/opiemm/opiemm.pro
new file mode 100644
index 0000000..0522ebe
--- a/dev/null
+++ b/examples/opiemm/opiemm.pro
@@ -0,0 +1,3 @@
1TEMPLATE = subdirs
2SUBDIRS = osoundsystemdemo
3
diff --git a/examples/opiemm/osoundsystemdemo/.cvsignore b/examples/opiemm/osoundsystemdemo/.cvsignore
new file mode 100644
index 0000000..0c98558
--- a/dev/null
+++ b/examples/opiemm/osoundsystemdemo/.cvsignore
@@ -0,0 +1,7 @@
1osoundsystemdemo
2Makefile*
3moc*
4*moc
5*.o
6~*
7
diff --git a/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp b/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp
new file mode 100644
index 0000000..f74a1b9
--- a/dev/null
+++ b/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp
@@ -0,0 +1,66 @@
1/*
2 =. This file is part of the Opie Project
3 .=l. Copyright (C) 2004 Opie Team <opie-devel@handhelds.org>
4 .>+-=
5 _;:, .> :=|. This library is free software; you can
6.> <`_, > . <= redistribute it and/or modify it under
7:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
8.="- .-=="i, .._ License as published by the Free Software
9 - . .-<_> .<> Foundation; either version 2 of the License,
10 ._= =} : or (at your option) any later version.
11 .%`+i> _;_.
12 .i_,=:_. -<s. This library is distributed in the hope that
13 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
14 : .. .:, . . . without even the implied warranty of
15 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
16 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.= = ; Library General Public License for more
18++= -. .` .: details.
19 : = ...= . :.=-
20 -. .:....=;==+<; You should have received a copy of the GNU
21 -_. . . )=. = Library General Public License along with
22 -- :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28
29/* OPIE */
30#include <opie2/osoundsystem.h>
31#include <opie2/odebug.h>
32
33using namespace Opie::MM;
34
35int main( int argc, char** argv )
36{
37 odebug << "OPIE Sound System Demo" << oendl;
38
39 OSoundSystem* sound = OSoundSystem::instance();
40
41 OSoundSystem::CardIterator it = sound->iterator();
42/*
43 while ( it.current() )
44 {
45 odebug << "DEMO: OSoundSystem contains Interface '" << it.current()->name() << "'" << oendl;
46 ++it;
47 }
48
49*/
50 OSoundCard* card = it.current();
51
52 OMixerInterface* mixer = card->mixer();
53
54 QStringList channels = mixer->allChannels();
55
56 for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it )
57 {
58 bool stereo = mixer->isStereo( *it );
59 odebug << "OSSDEMO: Mixer has channel " << *it << ( stereo ? "[stereo]" : "[mono]" ) << oendl;
60 odebug << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff )
61 << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl;
62 }
63
64 return 0;
65
66}
diff --git a/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro b/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro
new file mode 100644
index 0000000..95924be
--- a/dev/null
+++ b/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro
@@ -0,0 +1,12 @@
1TEMPLATE = app
2CONFIG = qt warn_on
3HEADERS =
4SOURCES = osoundsystemdemo.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lopiecore2 -lopiemm2
8TARGET = osoundsystemdemo
9MOC_DIR = moc
10OBJECTS_DIR = obj
11
12include( $(OPIEDIR)/include.pro )