Thread: Playing sound without internal speaker in C

  1. #1
    Lost In Rain
    Join Date
    Mar 2005
    Location
    Someone's heart!
    Posts
    4

    Question Playing sound without internal speaker in C

    Hiya!

    I’m making a piano, as a project in Borland Turbo C .It will play tune, can save and load etc .... something like the "Play it" by Microsoft (MS kids)!

    I am using the sound function with various frequencies to play various sounds …but its playing them in the internal speaker inside the CPU . My question is …Is there any way to play the sound in speaker? How? Please help as soon as possible....

    Thanks in advance !

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Yeah, you basically read/write the ports where your soundblaster compatible card is located in the I/O port map.

    Of course, working out which port addresses your card is using, and taking account of your particular cards "command set" is the tricky bit.

    Why on earth are you still using that fossil compiler. I mean, if you were using a win32 compiler, you would just use one of the win32 sound API calls, and get on with life.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 01:58 AM
  2. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  3. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 04:33 PM
  4. Using PC Speaker and NOT the sound card in a console...
    By Trauts in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 04-09-2003, 08:52 PM
  5. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 03:34 PM