summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiodevice.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/audiodevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index faadd72..8f04d0d 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -26,4 +26,9 @@
#include <qpe/config.h>
+#include <qmessagebox.h>
+
#include "audiodevice.h"
+
+#include <errno.h>
+
#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
@@ -211,4 +216,10 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
if ( ( d->handle = ::open( "/dev/dsp", O_WRONLY ) ) < 0 ) {
- perror("open(\"/dev/dsp\") sending to /dev/null instead");
- d->handle = ::open( "/dev/null", O_WRONLY );
+
+// perror("open(\"/dev/dsp\") sending to /dev/null instead");
+ perror("open(\"/dev/dsp\")");
+ QString errorMsg=tr("Somethin's wrong with\nyour sound device.\nopen(\"/dev/dsp\")\n")+(QString)strerror(errno)+tr("\n\nClosing player now.");
+ QMessageBox::critical(0, "Vmemo", errorMsg, tr("Abort"));
+ exit(-1); //harsh?
+// d->handle = ::open( "/dev/null", O_WRONLY );
+ // WTF?!?!
}