Diffstat (limited to 'core/multimedia/opieplayer/wavplugin') (more/less context) (ignore whitespace changes)
4 files changed, 18 insertions, 14 deletions
diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.cpp b/core/multimedia/opieplayer/wavplugin/wavplugin.cpp index 7ac63c0..4a0da16 100644 --- a/core/multimedia/opieplayer/wavplugin/wavplugin.cpp +++ b/core/multimedia/opieplayer/wavplugin/wavplugin.cpp | |||
@@ -70,7 +70,7 @@ public: | |||
70 | samples = -1; | 70 | samples = -1; |
71 | } | 71 | } |
72 | 72 | ||
73 | // expands out samples to the frequency of 44kHz | 73 | // expands out samples to the frequency of 44kHz //not any more |
74 | bool add( short *output, long count, long& done, bool stereo ) | 74 | bool add( short *output, long count, long& done, bool stereo ) |
75 | { | 75 | { |
76 | done = 0; | 76 | done = 0; |
@@ -88,6 +88,8 @@ public: | |||
88 | return FALSE; | 88 | return FALSE; |
89 | } | 89 | } |
90 | samples_due += chunkdata.samplesPerSec; | 90 | samples_due += chunkdata.samplesPerSec; |
91 | printf("samples due %d\r", samples_due); | ||
92 | fflush(stdout); | ||
91 | while ( count && (samples_due > chunkdata.samplesPerSec) ) { | 93 | while ( count && (samples_due > chunkdata.samplesPerSec) ) { |
92 | *output++ = l; | 94 | *output++ = l; |
93 | if ( stereo ) | 95 | if ( stereo ) |
@@ -328,13 +330,13 @@ bool WavPlugin::audioReadSamples( short *output, int channels, long samples, lon | |||
328 | } | 330 | } |
329 | 331 | ||
330 | double WavPlugin::getTime() { | 332 | double WavPlugin::getTime() { |
331 | // qDebug( "WavPlugin::getTime" ); | 333 | // qDebug( "WavPlugin::getTime" ); //this is a stupid hack here!! |
332 | return 0.0; | 334 | return d->chunkdata.wBitsPerSample; /*0.0*/; |
333 | } | 335 | } |
334 | 336 | ||
335 | int WavPlugin::audioBitsPerSample( int ) { | 337 | // int WavPlugin::audioBitsPerSample( int ) { |
336 | // qDebug( "WavPlugin::audioFormat %d", d->chunkdata.wBitsPerSample ); | 338 | // // qDebug( "WavPlugin::audioFormat %d", d->chunkdata.wBitsPerSample ); |
337 | return d->chunkdata.wBitsPerSample; // | 339 | // return d->chunkdata.wBitsPerSample; // |
338 | } | 340 | // } |
339 | 341 | ||
340 | 342 | ||
diff --git a/core/multimedia/opieplayer/wavplugin/wavplugin.h b/core/multimedia/opieplayer/wavplugin/wavplugin.h index 6ae6e06..1c8ba14 100644 --- a/core/multimedia/opieplayer/wavplugin/wavplugin.h +++ b/core/multimedia/opieplayer/wavplugin/wavplugin.h | |||
@@ -24,7 +24,8 @@ | |||
24 | 24 | ||
25 | #include <qstring.h> | 25 | #include <qstring.h> |
26 | #include <qapplication.h> | 26 | #include <qapplication.h> |
27 | #include "../mediaplayerplugininterface.h" | 27 | /* #include "../mediaplayerplugininterface.h" */ |
28 | #include <qpe/mediaplayerplugininterface.h> | ||
28 | 29 | ||
29 | 30 | ||
30 | // #define OLD_MEDIAPLAYER_API | 31 | // #define OLD_MEDIAPLAYER_API |
@@ -53,7 +54,7 @@ public: | |||
53 | int audioStreams(); | 54 | int audioStreams(); |
54 | int audioChannels( int stream ); | 55 | int audioChannels( int stream ); |
55 | int audioFrequency( int stream ); | 56 | int audioFrequency( int stream ); |
56 | int audioBitsPerSample( int stream ); | 57 | /* int audioBitsPerSample( int stream ); */ |
57 | int audioSamples( int stream ); | 58 | int audioSamples( int stream ); |
58 | bool audioSetSample( long sample, int stream ); | 59 | bool audioSetSample( long sample, int stream ); |
59 | long audioGetSample( int stream ); | 60 | long audioGetSample( int stream ); |
diff --git a/core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp b/core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp index 2923180..c232d7b 100644 --- a/core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp +++ b/core/multimedia/opieplayer/wavplugin/wavpluginimpl.cpp | |||
@@ -29,14 +29,14 @@ WavPluginImpl::WavPluginImpl() | |||
29 | WavPluginImpl::~WavPluginImpl() | 29 | WavPluginImpl::~WavPluginImpl() |
30 | { | 30 | { |
31 | if ( libmadplugin ) | 31 | if ( libmadplugin ) |
32 | delete libmadplugin; | 32 | delete libmadplugin; |
33 | } | 33 | } |
34 | 34 | ||
35 | 35 | ||
36 | MediaPlayerDecoder *WavPluginImpl::decoder() | 36 | MediaPlayerDecoder *WavPluginImpl::decoder() |
37 | { | 37 | { |
38 | if ( !libmadplugin ) | 38 | if ( !libmadplugin ) |
39 | libmadplugin = new WavPlugin; | 39 | libmadplugin = new WavPlugin; |
40 | return libmadplugin; | 40 | return libmadplugin; |
41 | } | 41 | } |
42 | 42 | ||
@@ -53,8 +53,8 @@ MediaPlayerEncoder *WavPluginImpl::encoder() | |||
53 | QRESULT WavPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 53 | QRESULT WavPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
54 | { | 54 | { |
55 | *iface = 0; | 55 | *iface = 0; |
56 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) | 56 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) |
57 | *iface = this, (*iface)->addRef(); | 57 | *iface = this, (*iface)->addRef(); |
58 | return QS_OK; | 58 | return QS_OK; |
59 | } | 59 | } |
60 | 60 | ||
diff --git a/core/multimedia/opieplayer/wavplugin/wavpluginimpl.h b/core/multimedia/opieplayer/wavplugin/wavpluginimpl.h index 10f9305..fb1fa73 100644 --- a/core/multimedia/opieplayer/wavplugin/wavpluginimpl.h +++ b/core/multimedia/opieplayer/wavplugin/wavpluginimpl.h | |||
@@ -20,7 +20,8 @@ | |||
20 | #ifndef WAV_PLUGIN_IMPL_H | 20 | #ifndef WAV_PLUGIN_IMPL_H |
21 | #define WAV_PLUGIN_IMPL_H | 21 | #define WAV_PLUGIN_IMPL_H |
22 | 22 | ||
23 | #include "../mediaplayerplugininterface.h" | 23 | |
24 | /* #include "../mediaplayerplugininterface.h" */ | ||
24 | 25 | ||
25 | 26 | ||
26 | class WavPlugin; | 27 | class WavPlugin; |