Results 1 to 5 of 5

Thread: Wave Files

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    22
    I know there is a number of ways to play wavefiles...
    How can I know when a file is done so I can make it play a different file in VB; always contiguous.


    If anyone knows, I would appreciate it.

  2. #2
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    Im not even sure if MediaPlayer plays wavs but if it does:
    MediaPlayer1_EndOfStream(all the parameters)
    Mediaplayer1.Play
    End Sub
    retired member. Thanks for everything

  3. #3
    Guest
    Play it synchronously, then the next line of code will only run when the WAV is finished.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    22
    Do you mean use sndplay sound. I thought you could not play big wave files.........30 meg with sndplaysound.

    To the person on the top........Thanks...........but can you play different sounds at the same time as the mmcontrol is playing.....

  5. #5
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    Take advantage of the Done event.

    Before I issue the play command, I set a flag and then reset it in the Done event routine.
    [code]
    somewhere in the code of my doorprize drawing app:
    If frmMain.mnuSound.Checked = True Then
    bWaveFinished = False
    ' select a sound clip
    iFileNum = iSelection Mod 8
    MMControl.filename = App.Path & "\WINNER" & iFileNum & ".WAV"
    MMControl.Command = "Open"
    MMControl.Command = "Play"
    While bWaveFinished = False
    DoEvents
    Wend
    End If
    .
    .
    Private Sub MMControl_Done(NotifyCode As Integer)
    ' Close the MCI

    MMControl.Command = "Close"
    bWaveFinished = True

    End Sub
    [\code]

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