Announcement

Collapse
No announcement yet.

Default Sound Device Frequency Generation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Arthur Gomide
    replied
    The info of Mr. Patrice Terrier is relevant but I'm using XP SP3.

    Leave a comment:


  • Peter Lameijn
    replied
    According to Patrice Terrier it seems that Vista and Windows 7 no longer support the MixerApi...
    (I never tried; I'm using W2K overhere...)

    Leave a comment:


  • Arthur Gomide
    replied
    Peter,

    Great work, thanks!

    Edited:

    Ooops! See the results with:
    1- on board sound
    2- on board and one USB card
    3- on board and two USB cards (same brand)
    Attached Files
    Last edited by Arthur Gomide; 18 Apr 2009, 04:08 PM.

    Leave a comment:


  • Peter Lameijn
    replied
    Posted an adapted version: http://www.powerbasic.com/support/pb...11&postcount=7

    Leave a comment:


  • Arthur Gomide
    replied
    Peter,

    Great program! Is there any chance that you include a dialog to select the sound card? My pc has three of them, one on board and two USB. This is very deep to me ...

    Leave a comment:


  • Peter Lameijn
    replied
    At some point, I would like to record, control volume, and do other audio device related activities
    See: http://www.powerbasic.com/support/pb...light=mixerapi

    Leave a comment:


  • Tom Carlson
    replied
    Mel and Guy,

    Thanks! I had seen playsound, but discarded it as not relevant to my problem. I didn't know it could play from memory as well as a file.

    At some point, I would like to record, control volume, and do other audio device related activities, but for now, I can generate frequency sweeps with this, much less painfully (I've been reading directx stuff) then I had feared.

    Thanks!

    Leave a comment:


  • Mel Bishop
    replied
    Originally posted by Tom Carlson View Post
    It only uses the PC's internal chassis speaker, however...
    Hmmm, It plays just fine on my PC's speakers. What kind of setup are you working with?

    Also, as noted, you can also use MCISENDSTRING and/or PLAYSOUND. Plenty of examples in the source code forum.

    Enjoy.

    Leave a comment:


  • Guy Dombrowski
    replied
    PBCC Windows sounds

    Tom,
    You can use any AVI file in PBCC with this command

    PlaySound "Anyfile.avi", 0, %SND_ASYNC

    I use it to play standard Windows warning sounds in my graphic Console programs

    Leave a comment:


  • Paul Dixon
    replied
    Tom,
    for an example of creating arbitrary frequencies of your choice , see here:


    Paul.

    Leave a comment:


  • Tom Carlson
    replied
    Not Sound Card

    Thanks for the reply. I actually had seen this from my initial search of the forum. Very fun!

    It only uses the PC's internal chassis speaker, however. I'm after something that accesses the Windows Default Audio Device, which could be your USB Headset, your sound card, etc.

    Leave a comment:


  • Mel Bishop
    replied
    Here's a EuroSiren I wrote. This may help get you started.
    Code:
    #INCLUDE "win32api.inc"
    
    FUNCTION PBMAIN () AS LONG
        LOCAL COUNT AS LONG
    
        DO
        IF INKEY$ = CHR$(27) THEN EXIT LOOP
        INCR COUNT
        IF COUNT > 5 THEN EXIT LOOP
        winbeep  500,300
        winbeep 1000,300
        LOOP
    
        END FUNCTION
    In as far as "taking control".....Hmmm...Even if it's possible, you may want to reconsider your options.

    Leave a comment:


  • Tom Carlson
    started a topic Default Sound Device Frequency Generation

    Default Sound Device Frequency Generation

    I'm fairly new to PowerBasic, and haven't programmed Windows in 10 years, so please don't assume I know anything at all.

    I need to take control of the default audio device in windows, and tell it to play a certain frequency.

    At the end of the day, I'll be using PowerBasic to generate audio tests to use in our Chinese factory when doing Q/A on speaker systems. I'll be generating frequency sweeps, doing impulse response, etc.

    But for now, I need to make a sound! I think once I get that far, I'll be on my way.

    I assume I need to interface with some windows library and make calls to that... But as a new Power Basic user, even that is something a quick example would really help me out.

    Thanks a lot.

    Tom
Working...
X
😀
🥰
🤢
😎
😡
👍
👎