Very Odd LapTop Ext Speaker Problem

Discussion in 'The Projects Forum' started by CDRIVE, Sep 20, 2009.

  1. CDRIVE

    Thread Starter Senior Member

    Jul 1, 2008
    2,223
    99
    I wrote a VB6 program that makes use of the Beep API and a .Wav (ding.wav) file called by the sndPlaySound Lib API. Everything works as it should until I plug in stereo earphones. When I do I will only hear the Ding.Wav file, the Beep API is AWOL! What gives with that? It seems nearly impossible! :confused:

    FYI: The Beep API generates a single tone frequency of a given duration written in code which looks like this but I doubt that it's relevant.
    Code ( (Unknown Language)):
    1.  
    2. Beep(800, 500)  ' Gen 800Hz tone for 500mS.
    3.  
     
    Last edited: Sep 20, 2009
  2. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    There are two different sound sources in a PC, the motherboard/case speaker and the actual 'sound card' (whether plug-in or integrated in the main board).

    The 'Beep' is likely from the motherboard speaker or sounder, the same one as the PC turn-on beep and BIOS overheat warnings etc.

    The Wave output will be via the Sound card.
     
  3. CDRIVE

    Thread Starter Senior Member

    Jul 1, 2008
    2,223
    99
    This Beep is not what VB uses as a default Beep. When you call Beep in VB it looks for the default sound or what the user selects for it. The Beep API is a different call that, I been told, goes back to an old DOS call.

    A guy on my VB group responded and he didn't experience this on his Laptop.
     
  4. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    Some machines with built-in audio link the 'beep' signal from the motherboard into the sound card, rather than add a separate speaker.

    Some add-on sound cards also have an input connector the m/b speaker connector can be linked to, for the same function.

    I'd try your program on a desktop machine that definitely has a separate speaker in the case, one that only gives the BIOS beep, and see what sound comes from where.
     
  5. CDRIVE

    Thread Starter Senior Member

    Jul 1, 2008
    2,223
    99
    Thanks for the replies and I do believe that the PC speaker vs the Sound Card speaker is most likely the cause of this dilemma. Is the PC speaker a physically separate speaker on a laptop or is the audio just routed to the same speakers differently? The reason that I ask is because I can hear the Beep API on both of my internal sound card speakers.
     
  6. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    That varies from make to make (and likely also with different models).

    Some are two completely separate systems, others may have the 'beep' routed to the soundcard - or occasionally just omitted.
     
  7. CDRIVE

    Thread Starter Senior Member

    Jul 1, 2008
    2,223
    99
    Thanks for your input RJ. It agrees with much of the responses I received on VBForums.
    I would be remiss if I didn't mention how the content of this topic qualifies for the Projects section of the forum. Well it does because this problem was discovered while testing the attached circuit. It's used with a Microsoft (free) App. that can record a window or the entire screen, including any audio that's present. My sound card does not appear (Windows Control Panel/ Audio Devices) to provide me with a method of mixing mic audio and output audio, so I took a simple hardware approach and slapped this together. This way I can make a demo video of my app and narrate at the same time. :)
     
Loading...