From 97e20b7cc746d5e2822385fc815739853a9c6e2f Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 21 Sep 2004 00:40:38 +0000 Subject: If sound is not yet finished return and do not try to play it again. if(!snd.isFinished()) return; --- (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') 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 @@ -345,10 +345,10 @@ 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 ) { -- cgit v0.9.0.2