summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.cpp
Unidiff
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 )
324 324
325 switch ( sound ){ 325 switch ( sound ){
326 case SHARP_BUZ_TOUCHSOUND: { 326 case SHARP_BUZ_TOUCHSOUND: {
327 static Sound touch_sound("touchsound"); 327 static Sound touch_sound("touchsound");
328 snd = &touch_sound; 328 snd = &touch_sound;
329 } 329 }
330 break; 330 break;
331 case SHARP_BUZ_KEYSOUND: { 331 case SHARP_BUZ_KEYSOUND: {
332 static Sound key_sound( "keysound" ); 332 static Sound key_sound( "keysound" );
333 snd = &key_sound; 333 snd = &key_sound;
334 } 334 }
335 break; 335 break;
336 case SHARP_BUZ_SCHEDULE_ALARM: 336 case SHARP_BUZ_SCHEDULE_ALARM:
337 default: { 337 default: {
338 static Sound alarm_sound("alarm"); 338 static Sound alarm_sound("alarm");
339 snd = &alarm_sound; 339 snd = &alarm_sound;
340 } 340 }
341 break; 341 break;
342 } 342 }
343 } 343 }
344 344
345 // If a soundname is defined, we expect that this device has 345 // If a soundname is defined, we expect that this device has
346 // sound capabilities.. Otherwise we expect to have the buzzer 346 // sound capabilities.. Otherwise we expect to have the buzzer
347 // device.. 347 // device..
348 if ( snd ){ 348 if ( snd && snd->isFinished() ){
349 changeMixerForAlarm( 0, "/dev/sound/mixer", snd ); 349 changeMixerForAlarm( 0, "/dev/sound/mixer", snd );
350 snd-> play(); 350 snd-> play();
351 } else { 351 } else if( !snd ) {
352 int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); 352 int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK );
353 353
354 if ( fd >= 0 ) { 354 if ( fd >= 0 ) {
355 ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); 355 ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound );
356 ::close ( fd ); 356 ::close ( fd );
357 } 357 }
358 358
359 } 359 }
360#endif 360#endif
361} 361}
362 362
363 363
364void Zaurus::playAlarmSound() 364void Zaurus::playAlarmSound()
365{ 365{
366 buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); 366 buzzer ( SHARP_BUZ_SCHEDULE_ALARM );
367} 367}
368 368
369void Zaurus::playTouchSound() 369void Zaurus::playTouchSound()
370{ 370{
371 buzzer ( SHARP_BUZ_TOUCHSOUND ); 371 buzzer ( SHARP_BUZ_TOUCHSOUND );
372} 372}
373 373
374void Zaurus::playKeySound() 374void Zaurus::playKeySound()
375{ 375{