Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MemWave - Play WAV audio from string memory using Win API
#1
MemWave uses a Windows API call to play a WAV file loaded as a string.  This way you can include small sounds directly in BAS code and play them from string memory, not from an external file.  The example code posted will play a howling WAV sound.  I used BASFILE to convert the WAV file into string data here, but you can use whatever method you want - the main thing here is the way of calling the API.  

- Dav

 - THIS CODE IS FOR WINDOWS ONLY -
Code: (Select All)
'============
'MEMWAVE.BAS
'============
'Plays a WAV file from memory (string) using Win API call.
'Coded by Dav, MAY/2022

DECLARE DYNAMIC LIBRARY "winmm"
    FUNCTION PlaySoundA& (lpszName AS STRING, BYVAL hModule AS LONG, BYVAL dwFlags AS LONG)
END DECLARE

CONST SND_APPLICATION = 128 '  look for application specific association
CONST SND_ALIAS = 65536 '  name is a WIN.INI [sounds] entry
CONST SND_ALIAS_ID = 1114112 '  name is a WIN.INI [sounds] entry identifier
CONST SND_ASYNC = 1 '  play asynchronously
CONST SND_FILENAME = 131072 '  name is a file name
CONST SND_LOOP = 8 '  loop the sound until next PlaySound
CONST SND_MEMORY = 4 '  lpszSoundName points to a memory file
CONST SND_NODEFAULT = 2 '  silence not default, if sound not found
CONST SND_NOSTOP = 16 '  don't stop any currently playing sound
CONST SND_NOWAIT = 8192 '  don't wait if the driver is busy
CONST SND_PURGE = 64 '  purge non-static events for task
CONST SND_RESOURCE = 262148 '  name is a resource name or atom
CONST SND_SYNC = 0 '  play synchronously (default)

wav$ = Basfile$ 'load wav data string

PRINT "Playing wave file from memory."
PRINT
PRINT "Press any key to stop sound and exit...."

'Play a sound from memory data...looping it...
x& = PlaySoundA(wav$, 0, SND_MEMORY OR SND_ASYNC OR SND_LOOP)

SLEEP

x& = PlaySoundA(CHR$(0), 0, SND_MEMORY) '<<<--- stop sound



FUNCTION Basfile$ () 'Coyote howl .WAV file converted with BASFILE.BAS
    A$ = ""
    A$ = A$ + "haIYkm7JKTWUWInWSUSMhfKHPUIPMXWVIXkVdT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b=Ri?d1j_7e"
    A$ = A$ + "A<BBWTn0mn1Y?`c>QL>9MF7mNB1i\WFjd6DomjW`3`X4?SP47AaWA1h#g8d?"
    A$ = A$ + "m;8MjUPA4TdYhOd7<`B?a;<d3h7nidXd7m_Z3S#GL`=\HXY>l1LWV^STh6\i"
    A$ = A$ + "J4;EH`M6iTFj`]SRWHgk7dD57n2Wf56i_77WbW?]YN29=Z;LJ9=jgISn2W98"
    A$ = A$ + "=b;8n1XO2KEDLdPaIl]oMe`Il=79m1YcOJ5LB1mSXiQGWTQoMZY_6>U;`oQL"
    A$ = A$ + "Q?XV7ABoHV:oI<engXVcZiANQ?\YNb[43F>OPGHT7l1d#oK2cIl1nC8XCm2W"
    A$ = A$ + "T^S6n`V:o7dD7AcSN5NnaY?j3T>[T>]Y:nO0mCKAWBcRo8J^oO7\>;m1o>ee"
    A$ = A$ + ";JD1eo2BM21MZGh4^V`O92j7CcO0j2WVn?j;LR[D^d8?h4dU>aKLjk]e09mQ"
    A$ = A$ + "\dODGh3nPoSNQcXJQ1Jn3l2oXVjI^jISBo3:Xc8Y1G`\o_dTngEeo5JBooV?"
    A$ = A$ + "l1N`O1do;k5na=Yo?HD2%%h1"

    btemp$ = ""
    FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
        IF INSTR(1, B$, "%") THEN
            FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
                IF F$ <> "%" THEN C$ = C$ + F$
            NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$)
            IF MID$(B$, j, 1) = "#" THEN
        MID$(B$, j) = "@": END IF: NEXT
        FOR t% = LEN(B$) TO 1 STEP -1
            B& = B& * 64 + ASC(MID$(B$, t%)) - 48
            NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
            X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
    NEXT: btemp$ = btemp$ + X$: NEXT
    Basfile$ = _INFLATE$(btemp$): btemp$ = ""
END FUNCTION

Find my programs here in Dav's QB64 Corner
Reply
#2
Well that certainly works, my cat is not a fan of the sound.
Reply




Users browsing this thread: 1 Guest(s)