summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-09-21 22:26:31 (UTC)
committer llornkcor <llornkcor>2002-09-21 22:26:31 (UTC)
commitb570ab8d46fc134f16d5959861869e36af50bd38 (patch) (side-by-side diff)
tree5aaaa321728b7b2f8f21c11b173d3f35b4ae4dcf
parentf4a389bf66404f7c7474c4ef27491f5910da550b (diff)
downloadopie-b570ab8d46fc134f16d5959861869e36af50bd38.zip
opie-b570ab8d46fc134f16d5959861869e36af50bd38.tar.gz
opie-b570ab8d46fc134f16d5959861869e36af50bd38.tar.bz2
close alert is dsp error
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp11
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() {
qDebug("Start recording engines");
recording = TRUE;
if (openDSP() == -1) {
recording = FALSE;
- msgLabel=0;
- delete msgLabel;
-
return FALSE;
}
config.setGroup("Defaults");
QDateTime dt = QDateTime::currentDateTime();
@@ -424,14 +421,18 @@ int VMemo::openDSP() {
channels=1; //zaurus has one input channel
} else {
dsp = open("/dev/dsp", O_RDONLY);
}
if(dsp == -1) {
- perror("open(\"/dev/dsp\")");
- errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno);
+ msgLabel->close();
+ msgLabel=0;
+ delete msgLabel;
+
+ perror("open(\"/dev/dsp\")");
+ errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno);
QMessageBox::critical(0, "vmemo", errorMsg, "Abort");
return -1;
}
if(ioctl(dsp, SNDCTL_DSP_SETFMT , &format)==-1) {
perror("ioctl(\"SNDCTL_DSP_SETFMT\")");