-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 83f19f5..25ee476 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -221,49 +221,49 @@ void VMemo::mousePressEvent( QMouseEvent * ) | |||
221 | 221 | ||
222 | QString dlName("vm_"); | 222 | QString dlName("vm_"); |
223 | dlName += dt.toString(); | 223 | dlName += dt.toString(); |
224 | DocLnk l; | 224 | DocLnk l; |
225 | l.setFile(fileName); | 225 | l.setFile(fileName); |
226 | l.setName(dlName); | 226 | l.setName(dlName); |
227 | l.setType("audio/x-wav"); | 227 | l.setType("audio/x-wav"); |
228 | l.setCategories(cats); | 228 | l.setCategories(cats); |
229 | l.writeLink(); | 229 | l.writeLink(); |
230 | 230 | ||
231 | record(); | 231 | record(); |
232 | } | 232 | } |
233 | 233 | ||
234 | void VMemo::mouseReleaseEvent( QMouseEvent * ) | 234 | void VMemo::mouseReleaseEvent( QMouseEvent * ) |
235 | { | 235 | { |
236 | qWarning("VMemo::mouseRelese() -> Done recording"); | 236 | qWarning("VMemo::mouseRelese() -> Done recording"); |
237 | recording = FALSE; | 237 | recording = FALSE; |
238 | } | 238 | } |
239 | 239 | ||
240 | int VMemo::openDSP() | 240 | int VMemo::openDSP() |
241 | { | 241 | { |
242 | Config cfg("Sound"); | 242 | Config cfg("Sound"); |
243 | cfg.setGroup("Record"); | 243 | cfg.setGroup("Record"); |
244 | 244 | ||
245 | speed = cfg.readNumEntry("SampleRate", 11025); | 245 | speed = cfg.readNumEntry("SampleRate", 22050); |
246 | channels = cfg.readNumEntry("Stereo", 1) ? 2 : 1; // 1 = stereo(2), 0 = mono(1) | 246 | channels = cfg.readNumEntry("Stereo", 1) ? 2 : 1; // 1 = stereo(2), 0 = mono(1) |
247 | if (cfg.readNumEntry("SixteenBit", 1)==1) | 247 | if (cfg.readNumEntry("SixteenBit", 1)==1) |
248 | { | 248 | { |
249 | format = AFMT_S16_LE; | 249 | format = AFMT_S16_LE; |
250 | resolution = 16; | 250 | resolution = 16; |
251 | } | 251 | } |
252 | else | 252 | else |
253 | { | 253 | { |
254 | format = AFMT_U8; | 254 | format = AFMT_U8; |
255 | resolution = 8; | 255 | resolution = 8; |
256 | } | 256 | } |
257 | 257 | ||
258 | if(systemZaurus) | 258 | if(systemZaurus) |
259 | { | 259 | { |
260 | dsp = open("/dev/dsp1", O_RDWR); //Zaurus needs /dev/dsp1 | 260 | dsp = open("/dev/dsp1", O_RDWR); //Zaurus needs /dev/dsp1 |
261 | channels=1; //zaurus has one input channel | 261 | channels=1; //zaurus has one input channel |
262 | } | 262 | } |
263 | else | 263 | else |
264 | dsp = open("/dev/dsp", O_RDWR); | 264 | dsp = open("/dev/dsp", O_RDWR); |
265 | 265 | ||
266 | if(dsp == -1) | 266 | if(dsp == -1) |
267 | { | 267 | { |
268 | perror("open(\"/dev/dsp\")"); | 268 | perror("open(\"/dev/dsp\")"); |
269 | return -1; | 269 | return -1; |