NAudio playing Ogg Vorbis!

Nov 18, 2010 at 11:48 PM
Edited Nov 18, 2010 at 11:53 PM

Hi Mark,

I think NAudio is really cool, but it would be even cooler with Ogg Vorbis playback support.

So I looked around for a managed library (C#) and found with csvorbis (Vorbis#), it is LGPL so it seems like a good candidate.

The link contains a very raw/drafty version of an NAudio Ogg Vorbis wrapper that uses csvorbis.

http://code.google.com/p/practicesharp/downloads/detail?name=NAudioOggVorbis.zip

(The zip contains a free Ogg Vorbis Audio that I download from vorbis.com)

The code is not ready for "production" but it does play the file very nicely, including a random seek a file position based on Time (using CurrentTime).

Also the original Vorbis# code is full of warnings which need to be cleaned up..but it seems to be working just fine.

What do you think?

 

Thanks,

Yuval

http://code.google.com/p/practicesharp

Coordinator
Nov 24, 2010 at 2:02 PM

thanks for this. NAudio can't include any LGPL code due to its MSPL license. However, we could add Ogg playback to a demo project at some point as a demo of what is possible.

Mark

Nov 24, 2010 at 2:25 PM

Hi Mark,

No problem.

Regarding the licenses (not an expert at all) - Why can't MSPL include LGPL? AFAIK MSPL does not mandate distributing of its own sources but it can still include sources of other projects.

I mean, assuming the NAudioOgg was a LGPL plug-in (a C# project outside of NAudio), I don't see a contradiction.

Also - would you consider moving NAudio to LGPL? What is the big advantage of using MSPL over LGPL? I'm probably missing something here.

Thanks,

Yuval

Coordinator
Nov 24, 2010 at 2:32 PM

I can only include LGPL as compiled binaries - so it would be OK for the demo project. NAudio is MSPL as it is the most commercial friendly licence.

Mark

Nov 24, 2010 at 2:45 PM

OK, last few questions: what about the reverse?

Can I use NAudio with my LGPL code? I understand these licenses are incompatible, but not sure - is it OK?

Are there any restrictions? Do I need to include a license file (e.g. NAUDIO_LICENSE) or something similar?

What if my project was under MIT license? Would that be OK for NAudio and Practice#?

Thanks,

Yuval

Coordinator
Nov 24, 2010 at 3:03 PM

yes, NAudio can be used in any project. The NAudio license is permissive, so you can include the NAudio.dll or the whole source tree if you prefer

Mark

Nov 24, 2010 at 5:26 PM

Thanks for the explanations.

As a result I decided to also include all 3rd party sources, NAudio in particular, in  Practice# GoogleCode subversion repository.

This kind of "gaps between the two worlds" (LGPL and MS-PL).

Yuval