-rw-r--r-- | libopie/odevice.cpp | 48 | ||||
-rw-r--r-- | libopie/odevice.h | 2 |
2 files changed, 21 insertions, 29 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index d952edf..61c24f4 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | #include <qfile.h> | 20 | #include <qfile.h> |
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #include <qpe/sound.h> | ||
23 | #include <qpe/resource.h> | ||
22 | 24 | ||
23 | 25 | ||
24 | #include "odevice.h" | 26 | #include "odevice.h" |
@@ -44,8 +46,6 @@ protected: | |||
44 | 46 | ||
45 | public: | 47 | public: |
46 | virtual void alarmSound ( ); | 48 | virtual void alarmSound ( ); |
47 | virtual void keySound ( ); | ||
48 | virtual void touchSound ( ); | ||
49 | 49 | ||
50 | virtual uint hasLeds ( ) const; | 50 | virtual uint hasLeds ( ) const; |
51 | virtual OLedState led ( uint which ) const; | 51 | virtual OLedState led ( uint which ) const; |
@@ -72,9 +72,6 @@ protected: | |||
72 | 72 | ||
73 | 73 | ||
74 | 74 | ||
75 | |||
76 | |||
77 | |||
78 | ODevice *ODevice::inst ( ) | 75 | ODevice *ODevice::inst ( ) |
79 | { | 76 | { |
80 | static ODevice *dev = 0; | 77 | static ODevice *dev = 0; |
@@ -145,14 +142,32 @@ OSystem ODevice::system ( ) | |||
145 | 142 | ||
146 | void ODevice::alarmSound ( ) | 143 | void ODevice::alarmSound ( ) |
147 | { | 144 | { |
145 | #ifndef QT_NO_SOUND | ||
146 | static Sound snd ( "alarm" ); | ||
147 | |||
148 | if ( snd. isFinished ( )) | ||
149 | snd. play ( ); | ||
150 | #endif | ||
148 | } | 151 | } |
149 | 152 | ||
150 | void ODevice::keySound ( ) | 153 | void ODevice::keySound ( ) |
151 | { | 154 | { |
155 | #ifndef QT_NO_SOUND | ||
156 | static Sound snd ( "keysound" ); | ||
157 | |||
158 | if ( snd. isFinished ( )) | ||
159 | snd. play ( ); | ||
160 | #endif | ||
152 | } | 161 | } |
153 | 162 | ||
154 | void ODevice::touchSound ( ) | 163 | void ODevice::touchSound ( ) |
155 | { | 164 | { |
165 | #ifndef QT_NO_SOUND | ||
166 | static Sound snd ( "touchsound" ); | ||
167 | |||
168 | if ( snd. isFinished ( )) | ||
169 | snd. play ( ); | ||
170 | #endif | ||
156 | } | 171 | } |
157 | 172 | ||
158 | uint ODevice::hasLeds ( ) const | 173 | uint ODevice::hasLeds ( ) const |
@@ -215,9 +230,7 @@ void ODeviceIPAQ::init ( ) | |||
215 | #include <sys/ioctl.h> | 230 | #include <sys/ioctl.h> |
216 | #include <linux/soundcard.h> | 231 | #include <linux/soundcard.h> |
217 | #include <qapplication.h> | 232 | #include <qapplication.h> |
218 | #include <qpe/resource.h> | ||
219 | #include <qpe/config.h> | 233 | #include <qpe/config.h> |
220 | #include <qpe/sound.h> | ||
221 | 234 | ||
222 | //#include <linux/h3600_ts.h> // including kernel headers is evil ... | 235 | //#include <linux/h3600_ts.h> // including kernel headers is evil ... |
223 | 236 | ||
@@ -275,27 +288,6 @@ void ODeviceIPAQ::alarmSound ( ) | |||
275 | #endif | 288 | #endif |
276 | } | 289 | } |
277 | 290 | ||
278 | void ODeviceIPAQ::touchSound ( ) | ||
279 | { | ||
280 | #ifndef QT_NO_SOUND | ||
281 | static Sound snd ( "touchsound" ); | ||
282 | |||
283 | if ( snd. isFinished ( )) | ||
284 | snd. play ( ); | ||
285 | #endif | ||
286 | } | ||
287 | |||
288 | void ODeviceIPAQ::keySound ( ) | ||
289 | { | ||
290 | #ifndef QT_NO_SOUND | ||
291 | static Sound snd ( "keysound" ); | ||
292 | |||
293 | if ( snd. isFinished ( )) | ||
294 | snd. play ( ); | ||
295 | #endif | ||
296 | } | ||
297 | |||
298 | |||
299 | uint ODeviceIPAQ::hasLeds ( ) const | 291 | uint ODeviceIPAQ::hasLeds ( ) const |
300 | { | 292 | { |
301 | return 1; | 293 | return 1; |
diff --git a/libopie/odevice.h b/libopie/odevice.h index 793becc..b40abe7 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -40,7 +40,7 @@ enum OVendor { | |||
40 | OVENDOR_Unknown, | 40 | OVENDOR_Unknown, |
41 | 41 | ||
42 | OVENDOR_HP, | 42 | OVENDOR_HP, |
43 | OVENDOR_Sharp, | 43 | OVENDOR_Sharp |
44 | }; | 44 | }; |
45 | 45 | ||
46 | enum OSystem { | 46 | enum OSystem { |