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
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