Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Pausing and Stopping a .wav file in VB6


Reply
 
Thread Tools Display Modes
  #1  
Old 06-11-2004, 07:58 PM
coltim coltim is offline
Centurion
 
Join Date: Apr 2004
Posts: 104
Default Pausing and Stopping a .wav file in VB6


I know you can pause and stop an .mp3 in VB6, but how would you do that with a .wav?

Thanks for the help in future.
Reply With Quote
  #2  
Old 06-11-2004, 08:27 PM
Val's Avatar
Val Val is offline
Senior Contributor
 
Join Date: May 2003
Location: Vancouver, WA
Posts: 1,268
Default

What are you using? MCI? If yes, then do same as .mp3, no difference (if you are using MCI you wouldn't ask, so you probably are not using it).
Reply With Quote
  #3  
Old 06-11-2004, 08:48 PM
coltim coltim is offline
Centurion
 
Join Date: Apr 2004
Posts: 104
Default

Would it be something like:

mciSendString "Close WAV", 0, 0, 0
mciSendString "Open " & FileName & " Alias WAV", 0, 0, 0
mciSendString "Play WAV", 0, 0, 0

?
Reply With Quote
  #4  
Old 06-11-2004, 09:24 PM
Lar_19's Avatar
Lar_19 Lar_19 is offline
Senior Contributor

* Expert *
 
Join Date: May 2002
Location: Vancouver, USA
Posts: 999
Default

More like...
mciSendString "Pause WAV", 0, 0, 0
__________________
1011 0000 1011
Reply With Quote
  #5  
Old 06-11-2004, 10:14 PM
coltim coltim is offline
Centurion
 
Join Date: Apr 2004
Posts: 104
Default

The program plays .mp3's and .wav's, and I can pause, resume, and stop the .mp3's, but not the .wav's.

Here is my code for the pausing part:

Private Sub cmdPause_Click()
If Paused = True Then
mciSendString "Play Mp3", 0, 0, 0
mciSendString "Play WAV", 0, 0, 0
Paused = False
cmdPause.Caption = "Pause"
Else
mciSendString "Pause Mp3", 0, 0, 0
mciSendString "Pause WAV", 0, 0, 0
Paused = True
cmdPause.Caption = "Play"
End If
End Sub
Reply With Quote
  #6  
Old 06-11-2004, 10:31 PM
coltim coltim is offline
Centurion
 
Join Date: Apr 2004
Posts: 104
Default

Nevermind. Some problem due to me using

ret& = waveOutGetNumDevs
If ret& > 0 Then
sndPlaySound cdFF.FileName, SND_ASYNC Or SND_NODEFAULT
End If

In it.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->