Diffstat (limited to 'core/applets/vmemo/vmemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index c27050d..7cc4062 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -266,13 +266,13 @@ void VMemo::mouseReleaseEvent( QMouseEvent * ) | |||
266 | } | 266 | } |
267 | 267 | ||
268 | bool VMemo::startRecording() { | 268 | bool VMemo::startRecording() { |
269 | 269 | ||
270 | if ( recording) | 270 | if ( recording) |
271 | return FALSE;; | 271 | return FALSE;; |
272 | Config config( "Sound" ); | 272 | Config config( "Vmemo" ); |
273 | config.setGroup( "System" ); | 273 | config.setGroup( "System" ); |
274 | useAlerts = config.readBoolEntry("Alert"); | 274 | useAlerts = config.readBoolEntry("Alert"); |
275 | 275 | ||
276 | // if(useAlerts) | 276 | // if(useAlerts) |
277 | // QMessageBox::message("VMemo","Really Record?");//) ==1) | 277 | // QMessageBox::message("VMemo","Really Record?");//) ==1) |
278 | // return; | 278 | // return; |
@@ -285,22 +285,20 @@ bool VMemo::startRecording() { | |||
285 | if (openDSP() == -1) { | 285 | if (openDSP() == -1) { |
286 | QMessageBox::critical(0, "VMemo", "Could not open dsp device.\n"+errorMsg, "Abort"); | 286 | QMessageBox::critical(0, "VMemo", "Could not open dsp device.\n"+errorMsg, "Abort"); |
287 | recording = FALSE; | 287 | recording = FALSE; |
288 | return FALSE; | 288 | return FALSE; |
289 | } | 289 | } |
290 | 290 | ||
291 | Config vmCfg("VMemo"); | 291 | config.setGroup("Defaults"); |
292 | vmCfg.setGroup("Defaults"); | ||
293 | 292 | ||
294 | QDateTime dt = QDateTime::currentDateTime(); | 293 | QDateTime dt = QDateTime::currentDateTime(); |
295 | 294 | ||
296 | QString fName; | 295 | QString fName; |
297 | Config cfg( "Sound" ); | 296 | config.setGroup( "System" ); |
298 | cfg.setGroup( "System" ); | ||
299 | fName = QPEApplication::documentDir() ; | 297 | fName = QPEApplication::documentDir() ; |
300 | fileName = cfg.readEntry("RecLocation", fName); | 298 | fileName = config.readEntry("RecLocation", fName); |
301 | 299 | ||
302 | int s; | 300 | int s; |
303 | s=fileName.find(':'); | 301 | s=fileName.find(':'); |
304 | if(s) | 302 | if(s) |
305 | fileName=fileName.right(fileName.length()-s-2); | 303 | fileName=fileName.right(fileName.length()-s-2); |
306 | qDebug("filename will be "+fileName); | 304 | qDebug("filename will be "+fileName); |
@@ -322,13 +320,13 @@ bool VMemo::startRecording() { | |||
322 | QMessageBox::critical(0, "VMemo", err, "Abort"); | 320 | QMessageBox::critical(0, "VMemo", err, "Abort"); |
323 | close(dsp); | 321 | close(dsp); |
324 | return FALSE; | 322 | return FALSE; |
325 | } | 323 | } |
326 | 324 | ||
327 | QArray<int> cats(1); | 325 | QArray<int> cats(1); |
328 | cats[0] = vmCfg.readNumEntry("Category", 0); | 326 | cats[0] = config.readNumEntry("Category", 0); |
329 | 327 | ||
330 | QString dlName("vm_"); | 328 | QString dlName("vm_"); |
331 | dlName += dt.toString(); | 329 | dlName += dt.toString(); |
332 | DocLnk l; | 330 | DocLnk l; |
333 | l.setFile(fileName); | 331 | l.setFile(fileName); |
334 | l.setName(dlName); | 332 | l.setName(dlName); |
@@ -343,13 +341,13 @@ bool VMemo::startRecording() { | |||
343 | void VMemo::stopRecording() { | 341 | void VMemo::stopRecording() { |
344 | recording = FALSE; | 342 | recording = FALSE; |
345 | } | 343 | } |
346 | 344 | ||
347 | int VMemo::openDSP() | 345 | int VMemo::openDSP() |
348 | { | 346 | { |
349 | Config cfg("Sound"); | 347 | Config cfg("Vmemo"); |
350 | cfg.setGroup("Record"); | 348 | cfg.setGroup("Record"); |
351 | 349 | ||
352 | speed = cfg.readNumEntry("SampleRate", 22050); | 350 | speed = cfg.readNumEntry("SampleRate", 22050); |
353 | channels = cfg.readNumEntry("Stereo", 1) ? 2 : 1; // 1 = stereo(2), 0 = mono(1) | 351 | channels = cfg.readNumEntry("Stereo", 1) ? 2 : 1; // 1 = stereo(2), 0 = mono(1) |
354 | if (cfg.readNumEntry("SixteenBit", 1)==1) { | 352 | if (cfg.readNumEntry("SixteenBit", 1)==1) { |
355 | format = AFMT_S16_LE; | 353 | format = AFMT_S16_LE; |