summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiodevice.cpp
Unidiff
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, 4 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 136e06c..73e41dc 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -145,13 +145,13 @@ void AudioDevice::setVolume( unsigned int leftVolume, unsigned int rightVolume,
145} 145}
146 146
147 147
148 148
149AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) { 149AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
150 qDebug("creating new audio device"); 150 qDebug("creating new audio device");
151 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; 151// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
152 d = new AudioDevicePrivate; 152 d = new AudioDevicePrivate;
153 d->frequency = f; 153 d->frequency = f;
154 d->channels = chs; 154 d->channels = chs;
155 d->bytesPerSample = bps; 155 d->bytesPerSample = bps;
156 qDebug("%d",bps); 156 qDebug("%d",bps);
157 int format=0; 157 int format=0;
@@ -197,13 +197,13 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
197 qDebug("channels %d",d->channels); 197 qDebug("channels %d",d->channels);
198 if ( ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels ) == -1 ) { 198 if ( ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels ) == -1 ) {
199 d->channels = ( d->channels == 1 ) ? 2 : d->channels; 199 d->channels = ( d->channels == 1 ) ? 2 : d->channels;
200 if(ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels )==-1) 200 if(ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels )==-1)
201 perror("ioctl(\"SNDCTL_DSP_CHANNELS\")"); 201 perror("ioctl(\"SNDCTL_DSP_CHANNELS\")");
202 } 202 }
203 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; 203// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
204 204
205 d->bufferSize = sound_fragment_bytes; 205 d->bufferSize = sound_fragment_bytes;
206 d->unwrittenBuffer = new char[d->bufferSize]; 206 d->unwrittenBuffer = new char[d->bufferSize];
207 d->unwritten = 0; 207 d->unwritten = 0;
208 d->can_GETOSPACE = TRUE; // until we find otherwise 208 d->can_GETOSPACE = TRUE; // until we find otherwise
209 209
@@ -216,20 +216,20 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
216 216
217} 217}
218 218
219 219
220AudioDevice::~AudioDevice() { 220AudioDevice::~AudioDevice() {
221 qDebug("destryo audiodevice"); 221 qDebug("destryo audiodevice");
222 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; 222// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
223 223
224# ifndef KEEP_DEVICE_OPEN 224# ifndef KEEP_DEVICE_OPEN
225 close( d->handle ); // Now it should be safe to shut the handle 225 close( d->handle ); // Now it should be safe to shut the handle
226# endif 226# endif
227 delete d->unwrittenBuffer; 227 delete d->unwrittenBuffer;
228 delete d; 228 delete d;
229 QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE; 229// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << FALSE;
230 230
231} 231}
232 232
233 233
234void AudioDevice::volumeChanged( bool muted ) 234void AudioDevice::volumeChanged( bool muted )
235{ 235{