author | llornkcor <llornkcor> | 2002-09-21 22:26:31 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-09-21 22:26:31 (UTC) |
commit | b570ab8d46fc134f16d5959861869e36af50bd38 (patch) (unidiff) | |
tree | 5aaaa321728b7b2f8f21c11b173d3f35b4ae4dcf /core/applets/vmemo/vmemo.cpp | |
parent | f4a389bf66404f7c7474c4ef27491f5910da550b (diff) | |
download | opie-b570ab8d46fc134f16d5959861869e36af50bd38.zip opie-b570ab8d46fc134f16d5959861869e36af50bd38.tar.gz opie-b570ab8d46fc134f16d5959861869e36af50bd38.tar.bz2 |
close alert is dsp error
Diffstat (limited to 'core/applets/vmemo/vmemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 4c07b3a..226f058 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -306,15 +306,12 @@ bool VMemo::startRecording() { | |||
306 | 306 | ||
307 | qDebug("Start recording engines"); | 307 | qDebug("Start recording engines"); |
308 | recording = TRUE; | 308 | recording = TRUE; |
309 | 309 | ||
310 | if (openDSP() == -1) { | 310 | if (openDSP() == -1) { |
311 | recording = FALSE; | 311 | recording = FALSE; |
312 | msgLabel=0; | ||
313 | delete msgLabel; | ||
314 | |||
315 | return FALSE; | 312 | return FALSE; |
316 | } | 313 | } |
317 | 314 | ||
318 | config.setGroup("Defaults"); | 315 | config.setGroup("Defaults"); |
319 | 316 | ||
320 | QDateTime dt = QDateTime::currentDateTime(); | 317 | QDateTime dt = QDateTime::currentDateTime(); |
@@ -424,14 +421,18 @@ int VMemo::openDSP() { | |||
424 | channels=1; //zaurus has one input channel | 421 | channels=1; //zaurus has one input channel |
425 | } else { | 422 | } else { |
426 | dsp = open("/dev/dsp", O_RDONLY); | 423 | dsp = open("/dev/dsp", O_RDONLY); |
427 | } | 424 | } |
428 | 425 | ||
429 | if(dsp == -1) { | 426 | if(dsp == -1) { |
430 | perror("open(\"/dev/dsp\")"); | 427 | msgLabel->close(); |
431 | errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno); | 428 | msgLabel=0; |
429 | delete msgLabel; | ||
430 | |||
431 | perror("open(\"/dev/dsp\")"); | ||
432 | errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno); | ||
432 | QMessageBox::critical(0, "vmemo", errorMsg, "Abort"); | 433 | QMessageBox::critical(0, "vmemo", errorMsg, "Abort"); |
433 | return -1; | 434 | return -1; |
434 | } | 435 | } |
435 | 436 | ||
436 | if(ioctl(dsp, SNDCTL_DSP_SETFMT , &format)==-1) { | 437 | if(ioctl(dsp, SNDCTL_DSP_SETFMT , &format)==-1) { |
437 | perror("ioctl(\"SNDCTL_DSP_SETFMT\")"); | 438 | perror("ioctl(\"SNDCTL_DSP_SETFMT\")"); |