summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp2
-rw-r--r--libopie2/opiecore/device/odevice_ramses.cpp2
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp2
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp4
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
@@ -330,8 +330,10 @@ void iPAQ::timerEvent ( QTimerEvent * )
void iPAQ::playAlarmSound()
{
#ifndef QT_NO_SOUND
static Sound snd ( "alarm" );
+ if(!snd.isFinished())
+ return;
changeMixerForAlarm(0, "/dev/sound/mixer", &snd );
snd. play();
#endif
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
@@ -98,8 +98,10 @@ void Ramses::init(const QString&)
void Ramses::playAlarmSound()
{
#ifndef QT_NO_SOUND
static Sound snd ( "alarm" );
+ if(!snd.isFinished())
+ return;
changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd);
snd.play();
#else
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
@@ -318,8 +318,10 @@ void SIMpad::timerEvent ( QTimerEvent * )
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();
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
@@ -344,12 +344,12 @@ void Zaurus::buzzer ( int sound )
// 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 );