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.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/multimedia/opieplayer/audiodevice.cpp b/core/multimedia/opieplayer/audiodevice.cpp
index 73e41dc..d01d2ba 100644
--- a/core/multimedia/opieplayer/audiodevice.cpp
+++ b/core/multimedia/opieplayer/audiodevice.cpp
@@ -146,20 +146,20 @@ 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");
+ // 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);
+ // qDebug("%d",bps);
int format=0;
if( bps == 8) format = AFMT_U8;
else if( bps <= 0) format = AFMT_S16_LE;
else format = AFMT_S16_LE;
- qDebug("AD- freq %d, channels %d, b/sample %d, bitrate %d",f,chs,bps,format);
+ // 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;
@@ -190,12 +190,12 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
if(ioctl( d->handle, SNDCTL_DSP_SETFRAGMENT, &fragments )==-1)
perror("ioctl(\"SNDCTL_DSP_SETFRAGMENT\")");
if(ioctl( d->handle, SNDCTL_DSP_SETFMT, & format )==-1)
perror("ioctl(\"SNDCTL_DSP_SETFMT\")");
- qDebug("freq %d", d->frequency);
+ // qDebug("freq %d", d->frequency);
if(ioctl( d->handle, SNDCTL_DSP_SPEED, &d->frequency )==-1)
perror("ioctl(\"SNDCTL_DSP_SPEED\")");
- qDebug("channels %d",d->channels);
+ // qDebug("channels %d",d->channels);
if ( ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels ) == -1 ) {
d->channels = ( d->channels == 1 ) ? 2 : d->channels;
if(ioctl( d->handle, SNDCTL_DSP_CHANNELS, &d->channels )==-1)
perror("ioctl(\"SNDCTL_DSP_CHANNELS\")");
@@ -217,9 +217,9 @@ AudioDevice::AudioDevice( unsigned int f, unsigned int chs, unsigned int bps ) {
}
AudioDevice::~AudioDevice() {
- qDebug("destryo audiodevice");
+ // qDebug("destryo audiodevice");
// QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE;
# ifndef KEEP_DEVICE_OPEN
close( d->handle ); // Now it should be safe to shut the handle
@@ -241,9 +241,9 @@ void AudioDevice::write( char *buffer, unsigned int length )
{
int t = ::write( d->handle, buffer, length );
if ( t<0 ) t = 0;
if ( t != (int)length) {
- qDebug("Ahhh!! memcpys 1");
+ // qDebug("Ahhh!! memcpys 1");
memcpy(d->unwrittenBuffer,buffer+t,length-t);
d->unwritten = length-t;
}
//#endif
@@ -304,9 +304,9 @@ unsigned int AudioDevice::canWrite() const
int AudioDevice::bytesWritten() {
int buffered = 0;
if ( ioctl( d->handle, SNDCTL_DSP_GETODELAY, &buffered ) ) {
- qDebug( "failed to get audio device position" );
+ // qDebug( "failed to get audio device position" );
return -1;
}
return buffered;
}