summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiodevice.cpp
authorllornkcor <llornkcor>2002-06-12 00:33:13 (UTC)
committer llornkcor <llornkcor>2002-06-12 00:33:13 (UTC)
commit8a53908265672bd3feee0ace40f9e5e38de2f30e (patch) (side-by-side diff)
tree9895780102a1f63cbe8cba9550320542f9b0e43b /core/multimedia/opieplayer/audiodevice.cpp
parentd7c563f849316c7a742769e88136058afb69a2d9 (diff)
downloadopie-8a53908265672bd3feee0ace40f9e5e38de2f30e.zip
opie-8a53908265672bd3feee0ace40f9e5e38de2f30e.tar.gz
opie-8a53908265672bd3feee0ace40f9e5e38de2f30e.tar.bz2
attempted to look at stumbling issues, and pops while starting and stoping audio device. needs to be re done
Diffstat (limited to 'core/multimedia/opieplayer/audiodevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiodevice.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index ad44abb..e0989d0 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -200,12 +200,14 @@ 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");
d->handle = ::open( "/dev/null", O_WRONLY );
@@ -241,26 +243,32 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
//if ( chs != d->channels ) qDebug( "Wanted %d, got %d channels", chs, d->channels );
//if ( f != d->frequency ) qDebug( "wanted %dHz, got %dHz", f, d->frequency );
//if ( capabilities & DSP_CAP_BATCH ) qDebug( "Sound card has local buffer" );
//if ( capabilities & DSP_CAP_REALTIME )qDebug( "Sound card has realtime sync" );
//if ( capabilities & DSP_CAP_TRIGGER ) qDebug( "Sound card has precise trigger" );
//if ( capabilities & DSP_CAP_MMAP ) qDebug( "Sound card can mmap" );
+ QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
+
}
AudioDevice::~AudioDevice() {
qDebug("destryo audiodevice");
+ QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
+
#ifdef Q_OS_WIN32
waveOutClose( (HWAVEOUT)d->handle );
#else
# 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 )
{
AudioDevicePrivate::muted = muted;