summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiodevice.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/audiodevice.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index e0989d0..3262e38 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -16,12 +16,13 @@
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
// L.J.Potter added better error code Fri 02-15-2002 14:37:47
+
#include <stdlib.h>
#include <stdio.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include "audiodevice.h"
@@ -185,12 +186,13 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
qDebug("creating new audio device");
+ QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
d = new AudioDevicePrivate;
d->frequency = f;
d->channels = chs;
d->bytesPerSample = bps;
qDebug("%d",bps);
int format=0;
@@ -200,13 +202,12 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
qDebug("AD- freq %d, channels %d, b/sample %d, bitrate %d",f,chs,bps,format);
connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) );
int fragments = 0x10000 * 8 + sound_fragment_shift;
int capabilities = 0;
- QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
#ifdef KEEP_DEVICE_OPEN
if ( AudioDevicePrivate::dspFd == 0 ) {
#endif
if ( ( d->handle = ::open( "/dev/dsp", O_WRONLY ) ) < 0 ) {
perror("open(\"/dev/dsp\") sending to /dev/null instead");
@@ -261,13 +262,12 @@ AudioDevice::~AudioDevice() {
# ifndef KEEP_DEVICE_OPEN
close( d->handle ); // Now it should be safe to shut the handle
# endif
delete d->unwrittenBuffer;
delete d;
#endif
- QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
}
void AudioDevice::volumeChanged( bool muted )
{