• 5 odgovora
  • 6.360 pregleda
Pesme 26.07.2003. u 19:05 · pre 282 meseci #1
Bok !!
Imam problem, kako da dobijem da mi pesme sviraju po redu?
Kad pokrenem program on odma pokrece 2. pesmu (song.wav) umesto prve!!???


Option Explicit
Dim zvuk
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
'--------------------------------------
Private Sub Form_Activate()
zvuk = sndPlaySound(App.Path & "\catamania.wav", 1)
zvuk = sndPlaySound(App.Path & "\song.wav", 1)
End Sub
'--------------------------------------

Hvala na pomoći!!

[Ovu poruku je menjao gfundak dana 05.08.2003. u 11:33 GMT]
Potpis
Walk with me and you will win :)
Re: Pesme 26.07.2003. u 20:24 · pre 282 meseci #2
Pogledaj vrednosti za flagove.

Flags for playing the sound. The following values are defined:
SND_ASYNC
The sound is played asynchronously and the function returns immediately after beginning the sound. To terminate an asynchronously played sound, call sndPlaySound with lpszSoundName set to NULL.
SND_LOOP
The sound plays repeatedly until sndPlaySound is called again with the lpszSoundName parameter set to NULL. You must also specify the SND_ASYNC flag to loop sounds.
SND_MEMORY
The parameter specified by lpszSoundName points to an image of a waveform sound in memory.
SND_NODEFAULT
If the sound cannot be found, the function returns silently without playing the default sound.
SND_NOSTOP
If a sound is currently playing, the function immediately returns FALSE, without playing the requested sound.
SND_SYNC
The sound is played synchronously and the function does not return until the sound ends.
Potpis
Blue Man Group
Re: Pesme 27.07.2003. u 13:09 · pre 282 meseci #3
Probaj da ubaciš još neku pesmu,pa vidi da li te ‘baca’ na sledeću ili poslednju pesmu.Probaj da izmeniš redosled pesama:možda nešto nije u redu sa prvom pesmom.


Potpis
U fudbalu je vazno jedno:a to su dve stvari:rad ,red i disciplina.
Re: Pesme 27.07.2003. u 23:35 · pre 282 meseci #4
Probao sam izmjeniti redisljed pesama,svejedno "baca" na zadnju pesnu nakon uključenja!? Probao sam ono sa flagovima,ne uspeva mi bas (SND_SNYC).

Imali ko kakav drugi predlog?

[Ovu poruku je menjao gfundak dana 05.08.2003. u 11:34 GMT]
Potpis
Walk with me and you will win :)
Re: Pesme 28.07.2003. u 10:57 · pre 282 meseci #5
Ovaj kod radi sigurno radi kako treba

Code:

Option Explicit

Const SND_SYNC = &H0

Dim zvuk    As Long
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

'--------------------------------------
Private Sub Form_Activate()
    zvuk = sndPlaySound("C:\Dzinglovi\vinca.wav", SND_SYNC)
    zvuk = sndPlaySound("C:\Dzinglovi\cia.wav", SND_SYNC)
End Sub
Potpis
Blue Man Group
Re: Pesme 05.08.2003. u 10:57 · pre 282 meseci #6
problem je kod flaga SND_SYNC = &H0 i SND_ASYNC = &H1
Potpis
Pozdrav StratOS
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"As a rule, software systems do not work well until they have been used, and have failed repeatedly, in real applications."
"The one who is digging the hole for the other to fall in is allready in it."
Prijavite se da biste odgovorili u ovoj temi.PrijavaRegistracija

Premeštanje teme