Diffstat (limited to 'libopie2/opiecore/device/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 26c6dca..129215b 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -752,19 +752,22 @@ void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) | |||
752 | { | 752 | { |
753 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); | 753 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); |
754 | } | 754 | } |
755 | 755 | ||
756 | void ODevice::playingStopped() { | 756 | void ODevice::playingStopped() { |
757 | const_cast<QObject*>(sender())->disconnect( this ); | 757 | const_cast<QObject*>(sender())->disconnect( this ); |
758 | #ifndef QT_NO_SOUND | ||
758 | if ( d->m_sound >= 0 ) { | 759 | if ( d->m_sound >= 0 ) { |
759 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); | 760 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); |
760 | ::close ( d->m_sound ); | 761 | ::close ( d->m_sound ); |
761 | } | 762 | } |
763 | #endif | ||
762 | } | 764 | } |
763 | 765 | ||
764 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { | 766 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { |
767 | #ifndef QT_NO_SOUND | ||
765 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { | 768 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { |
766 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { | 769 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { |
767 | Config cfg ( "qpe" ); | 770 | Config cfg ( "qpe" ); |
768 | cfg. setGroup ( "Volume" ); | 771 | cfg. setGroup ( "Volume" ); |
769 | 772 | ||
770 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); | 773 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); |
@@ -776,10 +779,11 @@ void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { | |||
776 | 779 | ||
777 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) | 780 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) |
778 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); | 781 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); |
779 | } | 782 | } |
780 | d->m_mixer = mixer; | 783 | d->m_mixer = mixer; |
781 | } | 784 | } |
785 | #endif | ||
782 | } | 786 | } |
783 | 787 | ||
784 | } | 788 | } |
785 | } | 789 | } |