summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp15
-rw-r--r--core/multimedia/opieplayer/libflash/libflashplugin.cpp4
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp6
3 files changed, 21 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index d01d2ba..6a38fc9 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -92,5 +92,9 @@ void AudioDevice::getVolume( unsigned int& leftVolume, unsigned int& rightVolume
muted = AudioDevicePrivate::muted;
unsigned int volume;
+#ifdef QT_QWS_DEVFS
+ int mixerHandle = open( "/dev/sound/mixer", O_RDWR );
+#else
int mixerHandle = open( "/dev/mixer", O_RDWR );
+#endif
if ( mixerHandle >= 0 ) {
if(ioctl( mixerHandle, MIXER_READ(0), &volume )==-1)
@@ -122,5 +126,9 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
unsigned int volume = ((rV << 8) & 0xFF00) | (lV & 0x00FF);
int mixerHandle = 0;
+#ifdef QT_QWS_DEVFS
+ if ( ( mixerHandle = open( "/dev/sound/mixer", O_RDWR ) ) >= 0 ) {
+#else
if ( ( mixerHandle = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
+#endif
if(ioctl( mixerHandle, MIXER_WRITE(0), &volume ) ==-1)
perror("ioctl(\"MIXER_WRITE\")");
@@ -169,13 +177,14 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
if ( AudioDevicePrivate::dspFd == 0 ) {
#endif
+#ifdef QT_QWS_DEVFS
+ if ( ( d->handle = ::open( "/dev/sound/dsp", O_WRONLY ) ) < 0 ) {
+#else
if ( ( d->handle = ::open( "/dev/dsp", O_WRONLY ) ) < 0 ) {
+#endif
-// 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?!?!
}
#ifdef KEEP_DEVICE_OPEN
diff --git a/core/multimedia/opieplayer/libflash/libflashplugin.cpp b/core/multimedia/opieplayer/libflash/libflashplugin.cpp
index 538c695..78cf555 100644
--- a/core/multimedia/opieplayer/libflash/libflashplugin.cpp
+++ b/core/multimedia/opieplayer/libflash/libflashplugin.cpp
@@ -152,5 +152,9 @@ bool LibFlashPlugin::open( const QString& fileName ) {
//FlashSettings(flashHandle, PLAYER_LOOP);
FlashGraphicInit(file, fd);
+#ifdef QT_QWS_DEVFS
+ FlashSoundInit(file, "/dev/sound/dsp");
+#else
FlashSoundInit(file, "/dev/dsp");
+#endif
FlashSetGetUrlMethod(file, showUrl, 0);
FlashSetGetSwfMethod(file, getSwf, (void*)file);
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index efea385..b393230 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -1373,6 +1373,10 @@ void PlayListWidget::keyPressEvent( QKeyEvent *)
void PlayListWidget::doBlank() {
- // qDebug("do blanking");
+ // TODO: why do we blank this way, why don't we use ODevice or ScreenSaver?
+#ifdef QT_QWS_DEVFS
+ fd=open("/dev/fb/0",O_RDWR);
+#else
fd=open("/dev/fb0",O_RDWR);
+#endif
if (fd != -1) {
ioctl(fd,FBIOBLANK,1);