Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows API, kaksi ääntä soimaan yhtäaikaa

2 views
Skip to first unread message

Jari Saari

unread,
Nov 13, 2003, 10:08:11 AM11/13/03
to
Olen koodannut VB6:lla pientä peliä ja ongelmana on äänet. Pelissä on
taustamusiikki, sekä erilaisia törmäys, yms ääniä.
Olen käyttänyt API funktiota;
"Declare Function PlaySound Lib "WINMM.DLL" Alias "sndPlaySoundA"
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long"

Ongelma on, kun olisi soitettava esim. törmäysääni, niin
taustamusiikki lakkaa.
Miten saan soimaan kaksi ääntä yhtäaikaa, vai onnistuuko ko.
funktiolla mitenkään?

argumenttina(uFlags) olen käyttänyt arvoa "H1".
Muut tietämäni, jotka eivät ole tuoneet ratkaisua, ovat;

SND_ALIAS = &H10000 lpszSoundNameis an event sound in the registry
SND_ASYNC = &H1 Play the sound asynchronously
SND_FILENAME = &H20000 The lpszSoundName is a file, which will be
played
SND_LOOP = &H8 The sound is played continuously
SND_MEMORY = &H4 The lpszSoundName is a pointer to a memory sound,
which should be played
SND_NODEFAULT = &H2 If the sound is not found, the function does not
play the default sound
SND_NOSTOP = &H10 The sound will not be played is a sound is
currently being played
SND_SYNC = &H0 The sound is played synchronously and the function
does not return until playback has stopped

[ Moderoijat tavoittaa osoitteesta saom-...@cc.jyu.fi ]
[ Ryhmän säännöt: http://www.iki.fi/gaia/saom/saannot.html ]
[ Ryhmän FAQ: http://www.iki.fi/gaia/faq/sao-faq.html ]

0 new messages