Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MMControl - Sometimes - no sound

Status
Not open for further replies.

papayac

Technical User
Jan 21, 2002
17
0
0
US
I am using the MMControl to play mp3 files. Most of the time it works great - but once in awhile I will get a MP3 that plays - but no sound comes out. By "Plays but no sound comes out" I meanm, the MMCAudio.Position is changing. Most of the code I am using is below. I don't think the code is wrong because - again it usually always works. The songs it does not work on - never work. Yet they play fine outside of VB6. I have just gone to WinXP - but I had this problem in Win 98SE also. I get no error messages. Everything says it isplaying - but there is no sound

Thanks in advance
David




If cmdPlay.Caption = "Play" Then
MMCAudio.FileName = Grd1.TextMatrix(Grd1.Row, 16)
lblSongPlaying.Caption = Grd1.TextMatrix(Grd1.Row, 1)
PlayMusic
Else
MMCAudio.Command = "Stop"
MMCAudio.Command = "Close"
lblSongPlaying.Caption = ""
lblSongPlaying.Visible = False
PlayerOn = False
Timer1.Enabled = False
End If


Public Sub PlayMusic()
If MMCAudio.Command = "Play" Then
MMCAudio.Command = "Stop"
MMCAudio.Command = "Close"

DoEvents
End If

lblSongPlaying.Visible = True
MMCAudio.Command = "Open"
MMCAudio.Command = "Play"
cmdPlay.Caption = "Stop"
Songlength = SecondsToTime(MMCAudio.Length / 1000)
End Sub


Private Sub MMCAudio_StatusUpdate()

lblAudio.Caption = SecondsToTime(MMCAudio.Position / 1000) & "/" & _
Songlength 'SecondsToTime(MMCAudio.Length / 1000)
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top