Hi,

Sorry for the long quietness. Here patch to fix sndfile bug with flac's. Vorbis 
comments 
in flac-files are usually in UTF-8. XMP specification also allows UTF-16 and 
UTF-32. 
Also according to the specification wav and aif should also be unicode 
(http://www.adobe.com/devnet/xmp/). With mp3's id3v2.4 also allows unicode text 
in 
addition to ÍSO 8859-1 nad UTF-16. It's now read as ascii. Here is patch to fix 
it. And 
this is for trunk (1.8). I sent the same patch for 1.7 last August.

-- 
-Matti
=== modified file 'mixxx/src/soundsourcesndfile.cpp'
--- mixxx/src/soundsourcesndfile.cpp	2010-05-25 02:36:51 +0000
+++ mixxx/src/soundsourcesndfile.cpp	2010-05-29 23:06:49 +0000
@@ -169,13 +169,12 @@
     this->setSampleRate(info.samplerate);
     this->setChannels(info.channels);
 
-    const char *string;
-    string = sf_get_string(fh, SF_STR_ARTIST);
+    QString string = QString::fromUtf8(sf_get_string(fh, SF_STR_ARTIST));
 //    qDebug() << location << "SF_STR_ARTIST" << string;
-    if(string && strlen(string))
+    if(!string.isEmpty())
         this->setArtist(string);
-    string = sf_get_string(fh, SF_STR_TITLE);
-    if(string && strlen(string))
+    string = QString::fromUtf8(sf_get_string(fh, SF_STR_TITLE));
+    if(!string.isEmpty())
         this->setTitle(string);
 //    qDebug() << location << "SF_STR_TITLE" << string;
     string = sf_get_string(fh, SF_STR_DATE);

------------------------------------------------------------------------------

_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to