georgepatotk
Contributor
Dear
I am struggling with this problem for few days already. Hope you could help me on this.
I am using AudioVideoPlayback.Audio to play midi files in my application.
For playing the first file, it works great. But when I play the second file, it gives me problem. Anyone can tell me why is this?
Below are the codes:
Variable:
Private WithEvents MusicAdapter1 As Microsoft.DirectX.AudioVideoPlayback.Audio
To play the file midi:
MusicAdapter1 = New Audio(MusicArray(0))
MusicAdapter1.Play()
To play the second file: (this is where problem occured)
MusicAdapter1.Stop()
MusicAdapter1.Dispose()
MusicAdapter1 = Nothing
MusicAdapter1 = New Audio(MusicArray(1))
MusicAdapter1.Play()
I am suspecting on the resource releasing problem. But, I couldn't find anyway to solve it. Please help me on that.
I am struggling with this problem for few days already. Hope you could help me on this.
I am using AudioVideoPlayback.Audio to play midi files in my application.
For playing the first file, it works great. But when I play the second file, it gives me problem. Anyone can tell me why is this?
Below are the codes:
Variable:
Private WithEvents MusicAdapter1 As Microsoft.DirectX.AudioVideoPlayback.Audio
To play the file midi:
MusicAdapter1 = New Audio(MusicArray(0))
MusicAdapter1.Play()
To play the second file: (this is where problem occured)
MusicAdapter1.Stop()
MusicAdapter1.Dispose()
MusicAdapter1 = Nothing
MusicAdapter1 = New Audio(MusicArray(1))
MusicAdapter1.Play()
I am suspecting on the resource releasing problem. But, I couldn't find anyway to solve it. Please help me on that.