summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/wavplugin/wavplugin.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/wavplugin/wavplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/wavplugin/wavplugin.cpp50
1 files changed, 29 insertions, 21 deletions
diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.cpp b/core/multimedia/opieplayer/wavplugin/wavplugin.cpp
index 4e82900..7f3a0a8 100644
--- a/core/multimedia/opieplayer/wavplugin/wavplugin.cpp
+++ b/core/multimedia/opieplayer/wavplugin/wavplugin.cpp
@@ -21,2 +21,12 @@
+
+#include "wavplugin.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+
+/* QT */
+#include <qfile.h>
+
+/* STD */
#include <stdio.h>
@@ -26,4 +36,2 @@
#include <unistd.h>
-#include <qfile.h>
-#include "wavplugin.h"
@@ -78,3 +86,3 @@ public:
if ( input == 0 ) {
- qDebug("no input");
+ odebug << "no input" << oendl;
return FALSE;
@@ -85,3 +93,3 @@ public:
if ( getSample(l, r) == FALSE ) {
- qDebug("didn't get sample");
+ odebug << "didn't get sample" << oendl;
return FALSE;
@@ -137,3 +145,3 @@ public:
if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) {
- qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag);
+ odebug << "WAV file: UNSUPPORTED FORMAT " << chunkdata.formatTag << "" << oendl;
return FALSE;
@@ -147,3 +155,3 @@ public:
} // while
- qDebug("bits %d", chunkdata.wBitsPerSample);
+ odebug << "bits " << chunkdata.wBitsPerSample << "" << oendl;
return TRUE;
@@ -209,3 +217,3 @@ WavPlugin::~WavPlugin() {
bool WavPlugin::isFileSupported( const QString& path ) {
-// qDebug( "WavPlugin::isFileSupported" );
+// odebug << "WavPlugin::isFileSupported" << oendl;
@@ -228,3 +236,3 @@ bool WavPlugin::isFileSupported( const QString& path ) {
bool WavPlugin::open( const QString& path ) {
-// qDebug( "WavPlugin::open" );
+// odebug << "WavPlugin::open" << oendl;
@@ -236,3 +244,3 @@ bool WavPlugin::open( const QString& path ) {
if ( d->input->open(IO_ReadOnly) == FALSE ) {
- qDebug("couldn't open file");
+ odebug << "couldn't open file" << oendl;
delete d->input;
@@ -250,3 +258,3 @@ bool WavPlugin::open( const QString& path ) {
bool WavPlugin::close() {
-// qDebug( "WavPlugin::close" );
+// odebug << "WavPlugin::close" << oendl;
@@ -260,3 +268,3 @@ bool WavPlugin::close() {
bool WavPlugin::isOpen() {
-// qDebug( "WavPlugin::isOpen" );
+// odebug << "WavPlugin::isOpen" << oendl;
return ( d->input != 0 );
@@ -266,3 +274,3 @@ bool WavPlugin::isOpen() {
int WavPlugin::audioStreams() {
-// qDebug( "WavPlugin::audioStreams" );
+// odebug << "WavPlugin::audioStreams" << oendl;
return 1;
@@ -272,3 +280,3 @@ int WavPlugin::audioStreams() {
int WavPlugin::audioChannels( int ) {
-// qDebug( "WavPlugin::audioChannels" );
+// odebug << "WavPlugin::audioChannels" << oendl;
return d->chunkdata.channels;// 2; // ### Always scale audio to stereo samples
@@ -278,3 +286,3 @@ int WavPlugin::audioChannels( int ) {
int WavPlugin::audioFrequency( int ) {
-// qDebug( "WavPlugin::audioFrequency %d", d->chunkdata.samplesPerSec );
+// odebug << "WavPlugin::audioFrequency " << d->chunkdata.samplesPerSec << "" << oendl;
return d->chunkdata.samplesPerSec; //44100; // ### Always scale to frequency of 44100
@@ -284,3 +292,3 @@ int WavPlugin::audioFrequency( int ) {
int WavPlugin::audioSamples( int ) {
-// qDebug( "WavPlugin::audioSamples" );
+// odebug << "WavPlugin::audioSamples" << oendl;
return d->samples / d->chunkdata.channels/2; // ### Scaled samples will be made stereo,
@@ -291,3 +299,3 @@ int WavPlugin::audioSamples( int ) {
bool WavPlugin::audioSetSample( long, int ) {
-// qDebug( "WavPlugin::audioSetSample" );
+// odebug << "WavPlugin::audioSetSample" << oendl;
return FALSE;
@@ -297,3 +305,3 @@ bool WavPlugin::audioSetSample( long, int ) {
long WavPlugin::audioGetSample( int ) {
-// qDebug( "WavPlugin::audioGetSample" );
+// odebug << "WavPlugin::audioGetSample" << oendl;
return 0;
@@ -327,3 +335,3 @@ bool WavPlugin::audioReadStereoSamples( short *output, long samples, long& sampl
bool WavPlugin::audioReadSamples( short *output, int channels, long samples, long& samplesMade, int ) {
-// qDebug( "WavPlugin::audioReadSamples" );
+// odebug << "WavPlugin::audioReadSamples" << oendl;
return d->add( output, samples, samplesMade, channels != 1 );
@@ -332,3 +340,3 @@ bool WavPlugin::audioReadSamples( short *output, int channels, long samples, lon
double WavPlugin::getTime() {
-// qDebug( "WavPlugin::getTime" ); //this is a stupid hack here!!
+// odebug << "WavPlugin::getTime" << oendl; //this is a stupid hack here!!
return d->chunkdata.wBitsPerSample; /*0.0*/;
@@ -337,4 +345,4 @@ double WavPlugin::getTime() {
// int WavPlugin::audioBitsPerSample( int ) {
-// // qDebug( "WavPlugin::audioFormat %d", d->chunkdata.wBitsPerSample );
-// return d->chunkdata.wBitsPerSample; //
+// // odebug << "WavPlugin::audioFormat " << d->chunkdata.wBitsPerSample << "" << oendl;
+// return d->chunkdata.wBitsPerSample; //
// }