Thread: Starting DSP - How to output on sound card

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    85

    Starting DSP - How to output on sound card

    Hi! I know some self-taught c++ and i want to dive into digital sound processing, but I lack even the most basic thing - sound output.

    How can I take a set of samples and output it on the sound card? I don't want to do it with a wav file, but actually with a bunch of values I have generated.

    I've tried googling, but I haven't found too much useful stuff.

    Thanks

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Is this on a Windows system? Try the "directsound" API, perhaps?

    --
    Mats

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    85
    Yes, it's a windows box.
    Meh. isn't there a way without involving directX?
    using a low-latency ASIO mixer, perhaps?

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    DSP usually means a digital signal processor, which is sometimes found on sound cards. which one do you want to know?

  5. #5
    Registered User
    Join Date
    Aug 2007
    Posts
    85
    i knew that it means processing, but i guess that it can mean both.
    I want to know how to output chunks of values on the soundcard so i can hear them

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I wouldn't know - of course, you could always try opening the soundcard itself and send IRP's directly, but I'm not sure that's a particularly good way to do it. Have you had a look at what the DirectSound API contains? [I had a very brief look, and it seems like you need a WAV format, but then I suspect you can't just give some arbitrary samples to the sound driver anyways, so you will most likely end up with a WAV or similar format - but you shouldn't need to write it to a file].

    --
    Mats

  7. #7
    Registered User
    Join Date
    Aug 2007
    Posts
    85
    I'll check. Thanks!

    Well, a WAV file contains a pretty long list of samples. My point was that I don't want to open the WAV, and send it via two commands, I actually want to generate the samples and send them out to the sound card.

    izua

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help With a BlackJack Program in C
    By Jp2009 in forum C Programming
    Replies: 15
    Last Post: 03-30-2009, 10:06 AM
  2. Vector out of range program crash.
    By Shamino in forum C++ Programming
    Replies: 11
    Last Post: 01-18-2008, 05:37 PM
  3. Beep
    By Stan100 in forum C++ Programming
    Replies: 19
    Last Post: 01-30-2003, 12:13 PM
  4. mixer to sound card problem, need help ASAP
    By Waldo2k2 in forum Tech Board
    Replies: 0
    Last Post: 12-09-2002, 05:02 PM
  5. Sound Card in Mandrake8.2
    By kwigibo in forum Linux Programming
    Replies: 1
    Last Post: 07-24-2002, 06:31 PM