-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ramses.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 4 |
4 files changed, 8 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 7f5aa7b..6193ddc 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -326,16 +326,18 @@ void iPAQ::timerEvent ( QTimerEvent * ) QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); } void iPAQ::playAlarmSound() { #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); + if(!snd.isFinished()) + return; changeMixerForAlarm(0, "/dev/sound/mixer", &snd ); snd. play(); #endif } bool iPAQ::setSoftSuspend ( bool soft ) diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp index 0cddf85..c75ea3a 100644 --- a/libopie2/opiecore/device/odevice_ramses.cpp +++ b/libopie2/opiecore/device/odevice_ramses.cpp @@ -94,16 +94,18 @@ void Ramses::init(const QString&) OC(d->m_cpu_frequencies->append("471000"); ) // mem=118, run=471, turbo=471, PXbus=236 OC'd mem/core/bus } void Ramses::playAlarmSound() { #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); + if(!snd.isFinished()) + return; changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd); snd.play(); #else #error QT_NO_SOUND defined #endif } diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index fd46b95..34876da 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp @@ -314,16 +314,18 @@ void SIMpad::timerEvent ( QTimerEvent * ) QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); } void SIMpad::playAlarmSound() { #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); + if(!snd.isFinished()) + return; /* save as the Sound is static! */ changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd); snd. play(); #endif } diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 64fa199..733479e 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -340,20 +340,20 @@ void Zaurus::buzzer ( int sound ) } break; } } // If a soundname is defined, we expect that this device has // sound capabilities.. Otherwise we expect to have the buzzer // device.. - if ( snd ){ + if ( snd && snd->isFinished() ){ changeMixerForAlarm( 0, "/dev/sound/mixer", snd ); snd-> play(); - } else { + } else if( !snd ) { int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); if ( fd >= 0 ) { ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); ::close ( fd ); } } |