Re: What simple open-source audio library do you recommend?



Tom Widmer [VC++ MVP] wrote:
Chris P. [MVP] wrote:

On Thu, 5 Oct 2006 07:11:01 -0700, jcsquire wrote:

I'd like to develop some cool free music synthesizers to demonstrate DSP concepts (I'm a DSP professor) as a win32 application, and need a recommendation on an open-source audio library. I need the ability to directly fill, in real-time, a double-buffered audio buffer (fill the first buffer, wait for a call saying the second is empty, fill the second while the first plays, wait for a call saying the first is empty, etc.). Not just playing a pre-recorded wav, but for playing an audio stream that I dynamically generate based on GUI controls (that control, for instance, an audio filter's resonance).

DirectX media calls to mmsound would work, but I'm hoping to find a more elegant OO encapusulation of a sound buffer object in a C++ class. Hopefully open-source so the source code is visible. FMOD seems way overkill, and doesn't provide source without a >$1k license. Ideally would like apps to be completely self-contained...no installers, no separate .dll's (that's why I'd like the source code), no need for users to separately download huge framework installers (why win32 and not .NET).


If you're looking for cross-platform, multi-interface support PortAudio is
currently the best option http://www.portaudio.com. For single interface
on win32 I would probably roll my own based on DirectSound. There are
probably some decent wrapper classes out there but I haven't been overly
impressed with what I've found so far. I have a simple DirectSound output sample on my website StreamDataTone3, it
uses an event/Callback method and takes care of the buffering and audio
interface in the DSStreamPlay class.


I'll second PortAudio. I haven't used it, but I wish I had, having unnecessarily implemented similar (but much less flexible) code in DirectSound, DirectKS and ASIO now, all of which are supported by PortAudio.

Tom

Portaudio is good, but is not c++ (although there are wrappers). if you want c++, I would go with RtAudio, which has been designed to work with c++. http://www.music.mcgill.ca/~gary/rtaudio/
Good luck,

Hector.
.



Relevant Pages

  • Re: What simple open-source audio library do you recommend?
    ... recommendation on an open-source audio library. ... buffer, wait for a call saying the second is empty, fill the second while the ... framework installers (why win32 and not .NET). ... I have a simple DirectSound output sample on my website StreamDataTone3, ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: What simple open-source audio library do you recommend?
    ... concepts as a win32 application, and need a recommendation on an open-source audio library. ... I need the ability to directly fill, in real-time, a double-buffered audio buffer. ... I have a simple DirectSound output sample on my website StreamDataTone3, ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: Small Audio Bug in DX9
    ... > I'm using DirectSound to play songs. ... > I'm creating the secondary audio buffers with DSBCAPS_LOCSOFTWARE flag (and ... > Primary buffer with SetCooperativeLevel, ... > When going to Control Panel and disabling all aceleration everything works ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Using DirectSound to stream 8-bit mulaw (g.711)
    ... > and outgoing audio which comes through my RTP module. ... > channel it through DirectSound so I can hear what's going on through ... I just have a feeling that my buffer setup isn't quite ... You can also decompress the data using the ACM (Audio Compression ...
    (microsoft.public.win32.programmer.directx.audio)
  • c6713 audio project
    ... I've decided for a major project to design a digital audio effects ... buffers are used ... PING buffer first, then the PONG buffer. ... void initMcbsp; ...
    (comp.dsp)