author | ar <ar> | 2004-06-03 18:50:11 (UTC) |
---|---|---|
committer | ar <ar> | 2004-06-03 18:50:11 (UTC) |
commit | f9d940da940c8d42dc072f60ad72e69025650cf8 (patch) (unidiff) | |
tree | d27646ceea53d25f68bc53f770424a3b3c434994 /libopie2/examples/opiemm/osoundsystemdemo | |
parent | 75922e8dd0f7390932471b5a611d94076a8472f3 (diff) | |
download | opie-f9d940da940c8d42dc072f60ad72e69025650cf8.zip opie-f9d940da940c8d42dc072f60ad72e69025650cf8.tar.gz opie-f9d940da940c8d42dc072f60ad72e69025650cf8.tar.bz2 |
- convert to odebug framework
Diffstat (limited to 'libopie2/examples/opiemm/osoundsystemdemo') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp index 8d421fd..bdf2149 100644 --- a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp +++ b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp | |||
@@ -1,10 +1,40 @@ | |||
1 | /* | ||
2 | =. This file is part of the Opie Project | ||
3 | .=l. Copyright (C) 2004 Opie Team <opie@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 */ | ||
1 | #include <opie2/osoundsystem.h> | 30 | #include <opie2/osoundsystem.h> |
31 | #include <opie2/odebug.h> | ||
2 | 32 | ||
3 | using namespace Opie::MM; | 33 | using namespace Opie::MM; |
4 | 34 | ||
5 | int main( int argc, char** argv ) | 35 | int main( int argc, char** argv ) |
6 | { | 36 | { |
7 | qDebug( "OPIE Sound System Demo" ); | 37 | odebug << "OPIE Sound System Demo" << oendl; |
8 | 38 | ||
9 | OSoundSystem* sound = OSoundSystem::instance(); | 39 | OSoundSystem* sound = OSoundSystem::instance(); |
10 | 40 | ||
@@ -12,7 +42,7 @@ int main( int argc, char** argv ) | |||
12 | /* | 42 | /* |
13 | while ( it.current() ) | 43 | while ( it.current() ) |
14 | { | 44 | { |
15 | qDebug( "DEMO: OSoundSystem contains Interface '%s'", (const char*) it.current()->name() ); | 45 | odebug << "DEMO: OSoundSystem contains Interface '" << it.current()->name() << "'" << oendl; |
16 | ++it; | 46 | ++it; |
17 | } | 47 | } |
18 | 48 | ||
@@ -25,8 +55,9 @@ int main( int argc, char** argv ) | |||
25 | 55 | ||
26 | for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it ) | 56 | for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it ) |
27 | { | 57 | { |
28 | qDebug( "OSSDEMO: Mixer has channel %s", (const char*) *it ); | 58 | odebug << "OSSDEMO: Mixer has channel " << *it << "" << oendl; |
29 | qDebug( "OSSDEMO: +--- volume %d (left) | %d (right)", mixer->volume( *it ) & 0xff, mixer->volume( *it ) >> 8 ); | 59 | odebug << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff ) |
60 | << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl; | ||
30 | } | 61 | } |
31 | 62 | ||
32 | return 0; | 63 | return 0; |