<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.13.5">
</HEAD>
<BODY>
Fabrice,<BR>
<BR>
TagLib and TagLib# are related only as far as TagLib# is a port of TagLib. The TagLib# email list is at <A HREF="http://forge.novell.com/mailman/listinfo/taglib-sharp-devel">http://forge.novell.com/mailman/listinfo/taglib-sharp-devel</A> I'm considering changing the name to avoid confusion.<BR>
<BR>
I'm not entirely sure what would be causing this error. If the actual getCurrentSongPath () is returning a string that is null terminated, that byte at the end may be throwing off that FileStream, but I'm not sure as I don't often work in the Windows environment. Please check that path.Length == path2.Length<BR>
<BR>
Please reply to me instead of the taglib list.<BR>
<BR>
Sincerely,<BR>
Brian Nickel<BR>
<BR>
On Thu, 2007-01-18 at 22:36 +0100, Fabrice DESHAYES aka Xtream wrote:
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">hi!</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">i'm trying to code a C# application with display ID3 tags of song currently played in winamp. I'm not coding a winamp plugin but a stand alone application in C# .NET 2.0 on VS2005 express.</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">If i used a hard coded string, the TagLib.File.Create(path) is working perfectly.</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">Exemple :</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">String path = &quot;C:\\mp3\\test.mp3&quot;;</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">TagLib.File.Create(path); // return a full fonctionnal object for tags reading</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">If i use the WACC lib to get path of the song currently played in winamp, i'm getting the same path as before (after some transformation because WACC return string with \0 terminated) , but TagLib.File.Create(path) always return null.</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">Exemple :</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">String path = &quot;C:\\mp3\\test.mp3&quot;;</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">String path2 = Winamp.getCurrentSongPath();</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">Console.WriteLine(path.CompareTo(path2)); // return zero : path = path2</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">TagLib.File.Create(path); // is not null, all is ok</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">TagLib.File.Create(path2); // is null so i can't read tags... :-(</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">I don't understand why taglib don't want to construct properly with certain String (which seem to be the same for C# string comparaison).</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">maybe someone has an idea ?</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT SIZE="2"><FONT COLOR="#000000">thanks for reading. bye!</FONT></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">&nbsp;</FONT>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">taglib-devel mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:taglib-devel@kde.org">taglib-devel@kde.org</A></FONT>
<FONT COLOR="#000000"><A HREF="https://mail.kde.org/mailman/listinfo/taglib-devel">https://mail.kde.org/mailman/listinfo/taglib-devel</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>