[Flac-dev] FLAC: library for C#

Josh Coalson xflac at yahoo.com
Thu Jun 14 13:53:34 PDT 2007


is wrapping c++ any easier?  because there is libFLAC++

otherwise, if you only need a certain subset of what FLAC does
it might be easier to write a smaller C interface + wrapper
implementation, then import that in c#.

Josh

--- Pyt <py.thoulon at gmail.com> wrote:

> I tried that approach a while ago and failed miserably. Marshalling
> the
> structs of structs in the flac lib turned out to be a nightmare (I
> don't
> pretend to be an expert, mind you...).
> I eventually switched to writing my own C# lib from scratch. Work is
> still
> under progress. It's no rocket science, I do this a G-job. It has
> definite
> limitations (no documentation, decodes only 16-bit files, no encode,
> *much*
> slower than the flac reference implementation, but still reasonable
> for what
> I do), but it can read and write metadata. It still needs a bit of
> polishing
> (esp. the documentation to be usable), but I'd be willing to share it
> at
> some point. Note that it's not open source for the time being, but
> that
> could be considered.
> 
> Pyt.
> 
> PS: If anybody has a real pinvoke wrapper for the reference lib, I'd
> gladly
> take it... !
> 
> 
> On 6/14/07, Jud White - jwhite at cdtag.com <+flac-
> dev+pyt+af0255c9db.jwhite#cdtag.com at spamgourmet.com> wrote:
> >
> > Harry,
> >
> > DllImport is the way to go, but it's not always straightforward
> what to
> > do (callbacks, pointers, and structs can get tricky).
> > http://pinvoke.net/ is a good resource for mapping Win32 API to C#
> using
> > DllImport, you may find it useful for your efforts.  I also found
> this
> > article helpful in context of DllImport:
> > http://www.vsj.co.uk/articles/display.asp?id=501.
> >
> > I have some C# code for working with FLAC and Vorbis Comments that
> does
> > not use the FLAC libraries:
> >
> >
>
http://idsharp.svn.sourceforge.net/viewvc/idsharp/IdSharp.Tagging/trunk/Tagging/VorbisComment/Classes/
> >
> >
>
http://idsharp.svn.sourceforge.net/viewvc/idsharp/IdSharp.AudioInfo/trunk/Flac/
> >
> > taglib# also handles flac
> >
> > Erik de Castro Lopo wrote:
> > > Harry Sack wrote:
> > >
> > >
> > >> but aren't they C++ headers en lib's?
> > >>
> > >
> > > Not C++, C.
> > >
> > >
> > >> I have no idea how I can include a C++
> > >> header in a C# project.
> > >> It this even possible?
> > >>
> > >
> > > Yes. Google for "dllimport csharp".
> > >
> > > Erik
> > >
> > _______________________________________________
> > Flac-dev mailing list
> > Flac-dev at xiph.org
> > http://lists.xiph.org/mailman/listinfo/flac-dev
> >
> > _______________________________________________
> Flac-dev mailing list
> Flac-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
> 



       
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php


More information about the Flac-dev mailing list