summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiemm/libopiemm2.control2
-rw-r--r--libopie2/opiemm/osoundsystem.cpp2
-rw-r--r--libopie2/opiemm/osoundsystem.h1
3 files changed, 1 insertions, 4 deletions
diff --git a/libopie2/opiemm/libopiemm2.control b/libopie2/opiemm/libopiemm2.control
index d0f34a8..0dd2df2 100644
--- a/libopie2/opiemm/libopiemm2.control
+++ b/libopie2/opiemm/libopiemm2.control
@@ -1,10 +1,10 @@
1Package: libopiemm2 1Package: libopiemm2
2Files: lib/libopiemm2.so.* 2Files: lib/libopiemm2.so.*
3Priority: optional 3Priority: optional
4Section: opie/system 4Section: opie/system
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: 1.8.2-$SUB_VERSION.2 7Version: $QPE_VERSION$EXTRAVERSION
8Depends: libqpe1, libopiecore2 (1.8.2) 8Depends: libqpe1, libopiecore2 (1.8.2)
9Provides: libopiemm2 9Provides: libopiemm2
10Description: Opie library 2.0 MM 10Description: Opie library 2.0 MM
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp
index 17e5cb0..13b26e6 100644
--- a/libopie2/opiemm/osoundsystem.cpp
+++ b/libopie2/opiemm/osoundsystem.cpp
@@ -297,26 +297,24 @@ void OMixerInterface::setVolume( const QString& channel, int left, int right )
297 { 297 {
298 if ( result & 0xff != left ) 298 if ( result & 0xff != left )
299 { 299 {
300 owarn << "Device adjusted volume from " << left << " to " << (result & 0xff) << oendl; 300 owarn << "Device adjusted volume from " << left << " to " << (result & 0xff) << oendl;
301 } 301 }
302 } 302 }
303 } 303 }
304} 304}
305 305
306 306
307int OMixerInterface::volume( const QString& channel ) const 307int OMixerInterface::volume( const QString& channel ) const
308{ 308{
309 int volume; 309 int volume;
310 310
311 if ( _channels.contains( channel ) ) 311 if ( _channels.contains( channel ) )
312 { 312 {
313 if ( ioctl( _fd, MIXER_READ( _channels[channel] ), &volume ) == -1 ) 313 if ( ioctl( _fd, MIXER_READ( _channels[channel] ), &volume ) == -1 )
314 { 314 {
315 owarn << "Can't get volume: " << strerror( errno ) << oendl; 315 owarn << "Can't get volume: " << strerror( errno ) << oendl;
316 } 316 }
317 else return volume; 317 else return volume;
318 } 318 }
319 return -1; 319 return -1;
320} 320}
321
322
diff --git a/libopie2/opiemm/osoundsystem.h b/libopie2/opiemm/osoundsystem.h
index 3c3b622..bd69114 100644
--- a/libopie2/opiemm/osoundsystem.h
+++ b/libopie2/opiemm/osoundsystem.h
@@ -209,25 +209,24 @@ class OMixerInterface : public QObject
209 * If no value for right is given, the value for left is taken for that. 209 * If no value for right is given, the value for left is taken for that.
210 */ 210 */
211 void setVolume( const QString& channel, int left, int right = -1 ); 211 void setVolume( const QString& channel, int left, int right = -1 );
212 /** 212 /**
213 * @returns the volume of @a channel or -1, if the channel doesn't exist. 213 * @returns the volume of @a channel or -1, if the channel doesn't exist.
214 * @note You might want to use @ref hasChannel() to check if a channel exists. 214 * @note You might want to use @ref hasChannel() to check if a channel exists.
215 */ 215 */
216 int volume( const QString& channel ) const; 216 int volume( const QString& channel ) const;
217 217
218 protected: 218 protected:
219 int _fd; 219 int _fd;
220 QMap<QString, int> _channels; 220 QMap<QString, int> _channels;
221 221
222 private: 222 private:
223 void init(); 223 void init();
224 private: 224 private:
225 class Private; 225 class Private;
226 Private *d; 226 Private *d;
227}; 227};
228 228
229} 229}
230} 230}
231 231
232#endif // OSOUNDSYSTEM_H 232#endif // OSOUNDSYSTEM_H
233