Diffstat (limited to 'libopie2/opiecore/device/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index e4233eb..aecccca 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -65,8 +65,9 @@ | |||
65 | #include <sys/time.h> | 65 | #include <sys/time.h> |
66 | #include <unistd.h> | 66 | #include <unistd.h> |
67 | #ifndef QT_NO_SOUND | 67 | #ifndef QT_NO_SOUND |
68 | #include <linux/soundcard.h> | 68 | #include <linux/soundcard.h> |
69 | #include <errno.h> | ||
69 | #endif | 70 | #endif |
70 | 71 | ||
71 | namespace Opie { | 72 | namespace Opie { |
72 | namespace Core { | 73 | namespace Core { |
@@ -748,17 +749,21 @@ void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) | |||
748 | 749 | ||
749 | /** | 750 | /** |
750 | * @internal | 751 | * @internal |
751 | * | 752 | * |
753 | * Returns the volume back to the user preference after an alarm is finished. | ||
754 | * | ||
752 | * @see changeMixerForAlarm | 755 | * @see changeMixerForAlarm |
753 | */ | 756 | */ |
754 | void ODevice::playingStopped() { | 757 | void ODevice::playingStopped() { |
755 | if ( sender() ) | 758 | if ( sender() ) |
756 | const_cast<QObject*>(sender())->disconnect( this ); | 759 | const_cast<QObject*>(sender())->disconnect( this ); |
757 | 760 | ||
758 | #ifndef QT_NO_SOUND | 761 | #ifndef QT_NO_SOUND |
759 | if ( d->m_sound >= 0 ) { | 762 | if ( d->m_sound >= 0 ) { |
760 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); | 763 | if (::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ) == -1) |
764 | qWarning( "ODevice::playingStopped() - " | ||
765 | "unable to change volume back (%s)", strerror( errno ) ); | ||
761 | ::close ( d->m_sound ); | 766 | ::close ( d->m_sound ); |
762 | } | 767 | } |
763 | #endif | 768 | #endif |
764 | } | 769 | } |