C# : TagLib.File.Create() return null in some case...?!

Brian Nickel brian.nickel at gmail.com
Fri Jan 19 00:06:20 CET 2007


Fabrice,

TagLib and TagLib# are related only as far as TagLib# is a port of
TagLib. The TagLib# email list is at
http://forge.novell.com/mailman/listinfo/taglib-sharp-devel I'm
considering changing the name to avoid confusion.

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

Please reply to me instead of the taglib list.

Sincerely,
Brian Nickel

On Thu, 2007-01-18 at 22:36 +0100, Fabrice DESHAYES aka Xtream wrote:
> hi!
>  
> 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.
>  
> If i used a hard coded string, the TagLib.File.Create(path) is working
> perfectly.
>  
> Exemple :
> String path = "C:\\mp3\\test.mp3";
> TagLib.File.Create(path); // return a full fonctionnal object for tags
> reading
>  
> 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.
>  
> Exemple :
> String path = "C:\\mp3\\test.mp3";
> String path2 = Winamp.getCurrentSongPath();
> Console.WriteLine(path.CompareTo(path2)); // return zero : path =
> path2
> TagLib.File.Create(path); // is not null, all is ok
> TagLib.File.Create(path2); // is null so i can't read tags... :-(
>  
> 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).
>  
> maybe someone has an idea ?
>  
> thanks for reading. bye!
>  
> 
> _______________________________________________
> taglib-devel mailing list
> taglib-devel at kde.org
> https://mail.kde.org/mailman/listinfo/taglib-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20070118/c7307d2e/attachment.html 


More information about the taglib-devel mailing list