Thread: Audio Programming

  1. #1
    Budding Synth Programmer samGwilliam's Avatar
    Join Date
    Feb 2002

    Audio Programming

    I need to write code that addresses the sound card. The problem is, I have no idea of how to go about it.

    I've written some VST plugins (for Cubase, etc) before but the host takes care of all the 'dirty work', leaving you to concentrate on the algorithm.

    Now I need to write a full standalone program that generates audio.

    First I would need it to operate at AT LEAST 44.1 kHz - preferably 96 kHz, so I presume I would need to dabble in realtime threading (which I am a little shaky on, but I'll get by).

    Secondly, I have no idea of how best to address the card itself. Would I use something like DirectX? If so, how do I interface with the API?

    Any help on the matter would be greatly appreciated.
    MSVC++ 6.0

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    The Win32 API for raw audio output is Waveform Audio (specifically, look at waveOutOpen, waveOutPrepareHeader, waveOutWrite, waveOutUnprepareHeader and waveOutClose). However, DirectSound is usually recommended. I have no experience with DirectSound but a search brings up some promising information. The Game forum may have more experience with DirectSound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Audio Programming
    By dwalters in forum Tech Board
    Replies: 0
    Last Post: 02-07-2008, 04:20 PM
  2. Audio Drivers
    By Tonto in forum Tech Board
    Replies: 8
    Last Post: 08-30-2006, 09:07 PM
  3. audio programming (from scratch)
    By simpleid in forum C Programming
    Replies: 6
    Last Post: 07-26-2006, 09:32 AM
  4. Bluetooth Audio Stream
    By Charmy in forum Windows Programming
    Replies: 2
    Last Post: 05-06-2006, 12:10 AM
  5. Port Audio
    By samGwilliam in forum Windows Programming
    Replies: 9
    Last Post: 12-07-2005, 11:43 AM