diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /mpeglib/example/splay/mp3framing.cpp | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'mpeglib/example/splay/mp3framing.cpp')
-rw-r--r-- | mpeglib/example/splay/mp3framing.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mpeglib/example/splay/mp3framing.cpp b/mpeglib/example/splay/mp3framing.cpp index 586899a3..ad17657c 100644 --- a/mpeglib/example/splay/mp3framing.cpp +++ b/mpeglib/example/splay/mp3framing.cpp @@ -30,8 +30,8 @@ using namespace std; #include <unistd.h> #define INPUT_SIZE 8192 -#define _QUEUE_FLOAT 1 -#define _QUEUE_INT 2 +#define _TQUEUE_FLOAT 1 +#define _TQUEUE_INT 2 void usage() { @@ -52,7 +52,7 @@ void initDSP(DSPWrapper* dsp) { int main(int argc, char** argv) { - int queueType=_QUEUE_INT; + int queueType=_TQUEUE_INT; int samples=8192; PCMFrame* outFrame; @@ -67,7 +67,7 @@ int main(int argc, char** argv) { break; } case 'f': { - queueType=_QUEUE_FLOAT; + queueType=_TQUEUE_FLOAT; break; } case 'c': { @@ -101,10 +101,10 @@ int main(int argc, char** argv) { // so we need a _FRAME_AUDIO_PCM type and we need // for splay at least MP3FRAMESIZE AudioFrameQueue* frameQueue; - if (queueType == _QUEUE_INT) { + if (queueType == _TQUEUE_INT) { frameQueue=new AudioFrameQueue(500,MP3FRAMESIZE,_FRAME_AUDIO_PCM); } - if (queueType == _QUEUE_FLOAT) { + if (queueType == _TQUEUE_FLOAT) { frameQueue=new AudioFrameQueue(100,MP3FRAMESIZE,_FRAME_AUDIO_FLOAT); } @@ -188,12 +188,12 @@ int main(int argc, char** argv) { // // we need to setup the dsp manually, when we do not play pcmFrames directly // - if (queueType == _QUEUE_INT) { + if (queueType == _TQUEUE_INT) { AudioFrame* audioFrame=frameQueue->getCurrent(); dsp->audioSetup(audioFrame); } - if (queueType == _QUEUE_FLOAT) { + if (queueType == _TQUEUE_FLOAT) { AudioFrame* audioFrame=frameQueue->getCurrent(); dsp->audioSetup(audioFrame->getStereo(),16, audioFrame->getSigned(), @@ -220,7 +220,7 @@ int main(int argc, char** argv) { - if (queueType == _QUEUE_INT) { + if (queueType == _TQUEUE_INT) { cout << "reading :"<<samples<<" data"<<endl; hasRead=frameQueue->copy(outFrame->getData(),samples); dsp->audioPlay((char*)outFrame->getData(),hasRead*sizeof(short int)); @@ -228,7 +228,7 @@ int main(int argc, char** argv) { } - if (queueType == _QUEUE_FLOAT) { + if (queueType == _TQUEUE_FLOAT) { int n; hasRead=frameQueue->copy(left,right,samples); |