To play from an array you need to load the wave file from HD into an array
I don't know if this is loaded into an array or not but once you load it you can play it many times by referring to it's alias name meaning you can load more than one wave file and give each one a different alias
I think if you want total control over the wave files like you suggested above you will probably need to use the waveIn/waveOut APIsCode:Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _ (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As _ Integer, ByVal hwndCallback As Integer) As Integer Dim myFile(0 To 10) As String Private Sub Form_Load() myFile(0) = Chr(34) & App.Path & "\your_wave_file.wav" & Chr(34) End Sub Private Sub Command1_Click() 'Play Call mciSendString("open " & myFile(0) & " type waveaudio alias Alias1", 0&, 0, 0) mciSendString "play Alias1", 0&, 0, 0 End Sub Private Sub Command2_Click() 'Pause mciSendString "pause Alias1", vbNullString, 0, 0 End Sub Private Sub Command3_Click() 'Resume mciSendString "resume Alias1", vbNullString, 0, 0 End Sub Private Sub Command4_Click() 'Stop mciSendString "stop Alias1", vbNullString, 0, 0 End Sub Private Sub Command5_Click() 'Close mciSendString "close Alias1", vbNullString, 0, 0 End Sub




Reply With Quote
