Hi,
Mixxx doesn't load the artists/titles of .flac files properly for me,
which is rather annoying.
Turns out newer (pre) versions of libsndfile have implemented pulling
these values from the flac header, and they didn't change their API to
do this, so it was a simple matter to add support for this to mixxx.
Please see the attached patch.
I've tested it with libsndfile 1.0.17 (current stable) and 1.0.8pre22
(latest prerelease). The older version doesn't support these values
for FLAC, so it just returns NULL and mixxx's behavior is unchanged.
The newer version fetches the values and (if the string isn't empty)
sets them in the Track object.
Thanks!
--
Mark
commit 6a8bfab4a110cbe013d38ef0def64aa3fec4f7de
Author: Mark Glines <[EMAIL PROTECTED]>
Date: Thu Aug 14 12:36:39 2008 -0700
Pull title/artist info from libsndfile, this gets .flac working.
Newer versions of libsndfile support this (1.0.18pre22 works for me);
older versions will just return NULL and behavior will be unchanged.
diff --git a/src/soundsourcesndfile.cpp b/src/soundsourcesndfile.cpp
index a97f845..e63407c 100644
--- a/src/soundsourcesndfile.cpp
+++ b/src/soundsourcesndfile.cpp
@@ -132,6 +132,14 @@ int SoundSourceSndFile::ParseHeader( TrackInfoObject *
Track )
Track->setSampleRate(info.samplerate);
Track->setChannels(info.channels);
+ const char *string;
+ string = sf_get_string(fh, SF_STR_ARTIST);
+ if(string && strlen(string))
+ Track->setArtist(string);
+ string = sf_get_string(fh, SF_STR_TITLE);
+ if(string && strlen(string))
+ Track->setTitle(string);
+
sf_close( fh );
return OK;
}
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel