Diffstat (limited to 'core/multimedia/opieplayer/libmad') (more/less context) (show whitespace changes)
5 files changed, 8 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/libmad/Makefile.in b/core/multimedia/opieplayer/libmad/Makefile.in index e9f74e7..552043c 100644 --- a/core/multimedia/opieplayer/libmad/Makefile.in +++ b/core/multimedia/opieplayer/libmad/Makefile.in | |||
@@ -211,13 +211,15 @@ layer3.o: layer3.c \ | |||
211 | huffman.o: huffman.c \ | 211 | huffman.o: huffman.c \ |
212 | libmad_global.h \ | 212 | libmad_global.h \ |
213 | huffman.h | 213 | huffman.h |
214 | 214 | ||
215 | libmadplugin.o: libmadplugin.cpp \ | 215 | libmadplugin.o: libmadplugin.cpp \ |
216 | libmadplugin.h \ | 216 | libmadplugin.h \ |
217 | ../mediaplayerplugininterface.h \ | ||
217 | mad.h | 218 | mad.h |
218 | 219 | ||
219 | libmadpluginimpl.o: libmadpluginimpl.cpp \ | 220 | libmadpluginimpl.o: libmadpluginimpl.cpp \ |
220 | libmadplugin.h \ | 221 | libmadplugin.h \ |
222 | ../mediaplayerplugininterface.h \ | ||
221 | libmadpluginimpl.h | 223 | libmadpluginimpl.h |
222 | 224 | ||
223 | 225 | ||
diff --git a/core/multimedia/opieplayer/libmad/libmad.pro b/core/multimedia/opieplayer/libmad/libmad.pro index 6c40a15..06e19e4 100644 --- a/core/multimedia/opieplayer/libmad/libmad.pro +++ b/core/multimedia/opieplayer/libmad/libmad.pro | |||
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp index 9d04f7e..9f8ba65 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp +++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp | |||
@@ -462,13 +462,13 @@ bool LibMadPlugin::decode( short *output, long samples, long& samplesMade ) { | |||
462 | memcpy( &(buffer[0][offset]), d->synth.pcm.samples[0], decodedSamples * sizeof(mad_fixed_t) ); | 462 | memcpy( &(buffer[0][offset]), d->synth.pcm.samples[0], decodedSamples * sizeof(mad_fixed_t) ); |
463 | if ( d->synth.pcm.channels == 2 ) | 463 | if ( d->synth.pcm.channels == 2 ) |
464 | memcpy( &(buffer[1][offset]), d->synth.pcm.samples[1], decodedSamples * sizeof(mad_fixed_t) ); | 464 | memcpy( &(buffer[1][offset]), d->synth.pcm.samples[1], decodedSamples * sizeof(mad_fixed_t) ); |
465 | offset += decodedSamples; | 465 | offset += decodedSamples; |
466 | buffered += decodedSamples; | 466 | buffered += decodedSamples; |
467 | } | 467 | } |
468 | 468 | //qApp->processEvents(); | |
469 | audio_pcm( output, samples, buffer[0], (d->synth.pcm.channels == 2) ? buffer[1] : 0 ); | 469 | audio_pcm( output, samples, buffer[0], (d->synth.pcm.channels == 2) ? buffer[1] : 0 ); |
470 | // audio_pcm( output, samples, buffer[1], buffer[0] ); | 470 | // audio_pcm( output, samples, buffer[1], buffer[0] ); |
471 | // audio_pcm( output, samples, buffer[0], buffer[1] ); | 471 | // audio_pcm( output, samples, buffer[0], buffer[1] ); |
472 | samplesMade = samples; | 472 | samplesMade = samples; |
473 | memmove( buffer[0], &(buffer[0][samples]), (buffered - samples) * sizeof(mad_fixed_t) ); | 473 | memmove( buffer[0], &(buffer[0][samples]), (buffered - samples) * sizeof(mad_fixed_t) ); |
474 | if ( d->synth.pcm.channels == 2 ) | 474 | if ( d->synth.pcm.channels == 2 ) |
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.h b/core/multimedia/opieplayer/libmad/libmadplugin.h index d85e0d4..d163458 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.h +++ b/core/multimedia/opieplayer/libmad/libmadplugin.h | |||
@@ -18,13 +18,14 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef LIBMAD_PLUGIN_H | 20 | #ifndef LIBMAD_PLUGIN_H |
21 | #define LIBMAD_PLUGIN_H | 21 | #define LIBMAD_PLUGIN_H |
22 | 22 | ||
23 | #include <qstring.h> | 23 | #include <qstring.h> |
24 | #include <qpe/mediaplayerplugininterface.h> | 24 | //#include <qpe/mediaplayerplugininterface.h> |
25 | #include "../mediaplayerplugininterface.h" | ||
25 | 26 | ||
26 | 27 | ||
27 | // #define OLD_MEDIAPLAYER_API | 28 | // #define OLD_MEDIAPLAYER_API |
28 | 29 | ||
29 | 30 | ||
30 | class LibMadPluginData; | 31 | class LibMadPluginData; |
@@ -49,12 +50,13 @@ public: | |||
49 | // If decoder doesn't support audio then return 0 here | 50 | // If decoder doesn't support audio then return 0 here |
50 | int audioStreams(); | 51 | int audioStreams(); |
51 | int audioChannels( int stream ); | 52 | int audioChannels( int stream ); |
52 | int audioFrequency( int stream ); | 53 | int audioFrequency( int stream ); |
53 | int audioSamples( int stream ); | 54 | int audioSamples( int stream ); |
54 | bool audioSetSample( long sample, int stream ); | 55 | bool audioSetSample( long sample, int stream ); |
56 | int audioBitsPerSample(int) {return 0;} | ||
55 | long audioGetSample( int stream ); | 57 | long audioGetSample( int stream ); |
56 | #ifdef OLD_MEDIAPLAYER_API | 58 | #ifdef OLD_MEDIAPLAYER_API |
57 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); | 59 | bool audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ); |
58 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); | 60 | bool audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ); |
59 | bool audioReadSamples( short *output, int channel, long samples, int stream ); | 61 | bool audioReadSamples( short *output, int channel, long samples, int stream ); |
60 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); | 62 | bool audioReReadSamples( short *output, int channel, long samples, int stream ); |
diff --git a/core/multimedia/opieplayer/libmad/libmadpluginimpl.h b/core/multimedia/opieplayer/libmad/libmadpluginimpl.h index 2c5ed3b..bc864ee 100644 --- a/core/multimedia/opieplayer/libmad/libmadpluginimpl.h +++ b/core/multimedia/opieplayer/libmad/libmadpluginimpl.h | |||
@@ -17,13 +17,14 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef LIBMAD_PLUGIN_IMPL_H | 20 | #ifndef LIBMAD_PLUGIN_IMPL_H |
21 | #define LIBMAD_PLUGIN_IMPL_H | 21 | #define LIBMAD_PLUGIN_IMPL_H |
22 | 22 | ||
23 | #include <qpe/mediaplayerplugininterface.h> | 23 | //#include <qpe/mediaplayerplugininterface.h> |
24 | #include "../mediaplayerplugininterface.h" | ||
24 | 25 | ||
25 | 26 | ||
26 | class LibMadPlugin; | 27 | class LibMadPlugin; |
27 | 28 | ||
28 | 29 | ||
29 | class LibMadPluginImpl : public MediaPlayerPluginInterface | 30 | class LibMadPluginImpl : public MediaPlayerPluginInterface |
@@ -38,13 +39,12 @@ public: | |||
38 | Q_REFCOUNT | 39 | Q_REFCOUNT |
39 | 40 | ||
40 | #endif | 41 | #endif |
41 | 42 | ||
42 | virtual MediaPlayerDecoder *decoder(); | 43 | virtual MediaPlayerDecoder *decoder(); |
43 | virtual MediaPlayerEncoder *encoder(); | 44 | virtual MediaPlayerEncoder *encoder(); |
44 | |||
45 | private: | 45 | private: |
46 | LibMadPlugin *libmadplugin; | 46 | LibMadPlugin *libmadplugin; |
47 | ulong ref; | 47 | ulong ref; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | 50 | ||