summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp4
1 files changed, 2 insertions, 2 deletions
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
@@ -324,52 +324,52 @@ void Zaurus::buzzer ( int sound )
switch ( sound ){
case SHARP_BUZ_TOUCHSOUND: {
static Sound touch_sound("touchsound");
snd = &touch_sound;
}
break;
case SHARP_BUZ_KEYSOUND: {
static Sound key_sound( "keysound" );
snd = &key_sound;
}
break;
case SHARP_BUZ_SCHEDULE_ALARM:
default: {
static Sound alarm_sound("alarm");
snd = &alarm_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 );
}
}
#endif
}
void Zaurus::playAlarmSound()
{
buzzer ( SHARP_BUZ_SCHEDULE_ALARM );
}
void Zaurus::playTouchSound()
{
buzzer ( SHARP_BUZ_TOUCHSOUND );
}
void Zaurus::playKeySound()
{