Results 1 to 6 of 6

Thread: Serge...Meg....this is a tough one

  1. #1
    Guest

    Talking

    Ok we play wav files for certain events, indicating successful conclusion or a complete shanmbles. With the successful conclusion we also play a gif file. Now this all appears to work honky dory....

    ....but.....

    loaded the app to a new clients site last night, they are using 486s sad but true......Everything works...except it is noticable that the wav plays before the gif begins...

    Does any know how to get them to operate in tandem. Kind of rather than

    Play Sound
    Play Gif

    more like Play Sound & Gif

    Not a huge problem, but does tenbd to stick in the mind as something that should be possible.

    Thanks in Advance.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    What do you mean Gif's a graphical format while wav is audio. If you mean to show a gif while playing a wav just load the gif into a picturebox and use sndplaysound api to play the wav
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Guest

    Unhappy kedaman...hmmm got that slightly wrong

    Ok no problems playing ani gifs and wav files in tandem.

    Problem is playing animations through bltbit and wav files through sndplaysound in tandem. Would appear vb does not multi task. How do ya get the API calls to work at the same time, do we have to throw in C++ routines????????

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Lightbulb Avi

    Will it be possible for you to combine the Gif and Sound into Avi format? I think it should be able to solve your problem.

  5. #5
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    Have you tried playing the WAV Asynchronously, meaning the code doesn't wait for the WAV to finish playing before executing the next line(s) of code?
    Code:
    Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
    Private Const SND_ASYNC = &H1
    
    Private Sub Command1_Click()
        'Play the WAV Asynchronously
        sndPlaySound "C:\Windows\Media\The Microsoft Sound.wav", SND_ASYNC
        'Play GIF here
    End Sub

  6. #6
    Guest

    Thumbs up Thanks Aaron

    Isn't it always the simple answers ya don't think of. As l stated wasn't a huge problem, but was still a distraction. Will try out tonight on Client's site

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width