|
|
* 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. * | * 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. * |
***************************************************************************/ | ***************************************************************************/ |
| |
|
#include <qconfig.h> // for Q_BYTE_ORDER |
#include <QtGui> | #include <QtGui> |
| |
#include "mp3transcode.h" | #include "mp3transcode.h" |
|
|
{ | { |
for ( int i = 0; i < ( size / 2 ); i++ ) | for ( int i = 0; i < ( size / 2 ); i++ ) |
{ | { |
|
#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN |
outputBuffer.append( tempBuffer[i * 2] ); | outputBuffer.append( tempBuffer[i * 2] ); |
outputBuffer.append( tempBuffer[i * 2 + 1] ); | outputBuffer.append( tempBuffer[i * 2 + 1] ); |
|
#else // Q_BIG_ENDIAN |
|
outputBuffer.append( tempBuffer[i * 2 + 1] ); |
|
outputBuffer.append( tempBuffer[i * 2] ); |
|
#endif // Q_BYTE_ORDER |
} | } |
| |
result = decodeMP3( &mpeg, NULL, 0, tempBuffer, sizeof( tempBuffer ), &size ); | result = decodeMP3( &mpeg, NULL, 0, tempBuffer, sizeof( tempBuffer ), &size ); |