~l0rdt/mixxx/features_replaygain

« back to all changes in this revision

Viewing changes to mixxx/src/soundsourcemp3.cpp

  • Committer: Vittorio
  • Date: 2010-11-07 15:27:52 UTC
  • mfrom: (2444.1.99 mixxx-trunk)
  • Revision ID: l0rdt@gmx.it-20101107152752-ncar4splwz92k16i
MergingĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
550
550
{
551
551
    setType("mp3");
552
552
 
553
 
    TagLib::MPEG::File f(getFilename().toUtf8().constData());
 
553
    #ifdef __WINDOWS__
 
554
                /* From Tobias: A Utf-8 string did not work on my Windows XP (German edition)
 
555
                 * If you try this conversion, f.isValid() will return false in many cases
 
556
                 * and processTaglibFile() will fail
 
557
                 * 
 
558
                 * The method toLocal8Bit() returns the local 8-bit representation of the string as a QByteArray. 
 
559
                 * The returned byte array is undefined if the string contains characters not supported 
 
560
                 * by the local 8-bit encoding.
 
561
                 */
 
562
                TagLib::MPEG::File f(getFilename().toLocal8Bit().constData());
 
563
        #else
 
564
                TagLib::MPEG::File f(getFilename().toUtf8().constData());
 
565
        #endif
554
566
 
555
567
    // Takes care of all the default metadata
556
568
    bool result = processTaglibFile(f);