author | mickeyl <mickeyl> | 2004-01-01 14:49:23 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-01 14:49:23 (UTC) |
commit | 6bde04710d84fe2c5369c895bd784e9d81754550 (patch) (side-by-side diff) | |
tree | 21f397e783d63b1fac53ee450edf780e09d0a70b /libopie2 | |
parent | a7908d91718d26b0d44e3aacb12fa87d9b548785 (diff) | |
download | opie-6bde04710d84fe2c5369c895bd784e9d81754550.zip opie-6bde04710d84fe2c5369c895bd784e9d81754550.tar.gz opie-6bde04710d84fe2c5369c895bd784e9d81754550.tar.bz2 |
bye bye qDebug, hello odebug
-rw-r--r-- | libopie2/opiemm/opiemm.pro | 4 | ||||
-rw-r--r-- | libopie2/opiemm/osoundsystem.cpp | 30 |
2 files changed, 14 insertions, 20 deletions
diff --git a/libopie2/opiemm/opiemm.pro b/libopie2/opiemm/opiemm.pro index d5c8238..d6f54ee 100644 --- a/libopie2/opiemm/opiemm.pro +++ b/libopie2/opiemm/opiemm.pro @@ -8,10 +8,6 @@ TARGET = opiemm2 VERSION = 1.8.2 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -MOC_DIR = moc -OBJECTS_DIR = obj - !contains( platform, x11 ) { include ( $(OPIEDIR)/include.pro ) diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp index d857659..ca63389 100644 --- a/libopie2/opiemm/osoundsystem.cpp +++ b/libopie2/opiemm/osoundsystem.cpp @@ -30,6 +30,7 @@ */ #include <opie2/osoundsystem.h> +#include <opie2/odebug.h> #include <errno.h> #include <fcntl.h> @@ -49,7 +50,7 @@ OSoundSystem* OSoundSystem::_instance = 0; OSoundSystem::OSoundSystem() { - qDebug( "OSoundSystem::OSoundSystem()" ); + odebug << "OSoundSystem::OSoundSystem()" << oendl; synchronize(); } @@ -65,15 +66,12 @@ void OSoundSystem::synchronize() /* - - - QString str; QFile f( "/dev/sound" ); bool hasFile = f.open( IO_ReadOnly ); if ( !hasFile ) { - qDebug( "OSoundSystem: /dev/sound not existing. No sound devices available" ); + odebug << "OSoundSystem: /dev/sound not existing. No sound devices available" << oendl; return; } QTextStream s( &f ); @@ -126,7 +124,7 @@ OSoundSystem::CardIterator OSoundSystem::iterator() const OSoundCard::OSoundCard( QObject* parent, const char* name ) :QObject( parent, name ), _audio( 0 ), _mixer( 0 ) { - qDebug( "OSoundCard::OSoundCard()" ); + odebug << "OSoundCard::OSoundCard()" << oendl; init(); } @@ -150,7 +148,7 @@ void OSoundCard::init() OAudioInterface::OAudioInterface( QObject* parent, const char* name ) :QObject( parent, name ) { - qDebug( "OAudioInterface::OAudioInterface()" ); + odebug << "OAudioInterface::OAudioInterface()" << oendl; init(); } @@ -174,7 +172,7 @@ void OAudioInterface::init() OMixerInterface::OMixerInterface( QObject* parent, const char* name ) :QObject( parent, name ) { - qDebug( "OMixerInterface::OMixerInterface()" ); + odebug << "OMixerInterface::OMixerInterface()" << oendl; init(); } @@ -190,7 +188,7 @@ void OMixerInterface::init() _fd = ::open( name(), O_RDWR ); if ( _fd == -1 ) { - qWarning( "can't open mixer." ); + owarn << "OMixerInterface::init(): Can't open mixer." << oendl; return; } @@ -212,7 +210,7 @@ void OMixerInterface::init() if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "PlayRecord", SOUND_MIXER_RECLEV ); if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "PlayInputGain", SOUND_MIXER_IGAIN ); if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "PlayOutputGain", SOUND_MIXER_OGAIN ); - //qDebug( "devmask available and constructed." ); + //odebug << "devmask available and constructed." << oendl; } devmask = 0; @@ -232,7 +230,7 @@ void OMixerInterface::init() if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "RecRecord", SOUND_MIXER_RECLEV ); if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "RecInputGain", SOUND_MIXER_IGAIN ); if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "RecOutputGain", SOUND_MIXER_OGAIN ); - //qDebug( "recmask available and constructed." ); + //odebug << "recmask available and constructed." << oendl; } /* ChannelIterator it; @@ -259,13 +257,13 @@ QStringList OMixerInterface::allChannels() const QStringList OMixerInterface::recChannels() const { - qWarning( "NYI" ); + owarn << "NYI" << oendl; } QStringList OMixerInterface::playChannels() const { - qWarning( "NYI" ); + owarn << "NYI" << oendl; } @@ -285,13 +283,13 @@ void OMixerInterface::setVolume( const QString& channel, int left, int right ) int result = ioctl( _fd, MIXER_WRITE( _channels[channel] ), &volume ); if ( result == -1 ) { - qWarning( "Can't set volume: %s", strerror( errno ) ); + owarn << "Can't set volume: " << strerror( errno ) << oendl; } else { if ( result & 0xff != left ) { - qWarning( "Device adjusted volume from %d to %d", left, result & 0xff ); + owarn << "Device adjusted volume from " << left << " to " << (result & 0xff) << oendl; } } } @@ -306,7 +304,7 @@ int OMixerInterface::volume( const QString& channel ) const { if ( ioctl( _fd, MIXER_READ( _channels[channel] ), &volume ) == -1 ) { - qWarning( "Can't get volume: %s", strerror( errno ) ); + owarn << "Can't get volume: " << strerror( errno ) << oendl; } else return volume; } |