
09-05-2005, 11:03 PM
|
|
Newcomer
|
|
Join Date: Sep 2005
Posts: 1
|
|
DirectSound, multiple sounds in vb .net
|
hi guys,
i'm pretty much a noob at vb and so im having probs getting mutliple sounds 2 play thru directsound. basically my program is a mix machine which plays sounds on keypress then records what youve done.
any help is very much appreciated as i've been running into brick walls all over the net =/
thx, Rin.
*i've been reading up a bit more and i need 2 create multiple sound buffers, and i tried 'my' version of multiple buffers
Code:
Public Class Form1
Inherits System.Windows.Forms.Form
Private _dev As Device
Private _dev1 As Device
Private _buffer As SecondaryBuffer
Private _buffer2 As SecondaryBuffer
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
_dev = New Device
_dev.SetCooperativeLevel(Me.Handle, CooperativeLevel.Priority)
_dev1 = New Device
_dev1.SetCooperativeLevel(Me.Handle, CooperativeLevel.Priority)
End Sub
but it only seemed 2 result in the buffer containing the last selected file. (theyre selected using an open file dialog that sets the buffer
Code:
Private Sub btnSelFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelFile.Click
If ofd.ShowDialog Then
_buffer = New SecondaryBuffer(ofd.FileName, _dev)
End If
End Sub
Private Sub btnSelFile1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelFile1.Click
If ofd1.ShowDialog Then
_buffer2 = New SecondaryBuffer(ofd1.FileName, _dev1)
End If
End Sub
**found a resource that im finding hard 2 implement into this project http://www.springeronline.com/sgw/cd...88685-0,00.pdf
it has a method for multiple sound but i dont quite understand it...
|
Last edited by Rintaro; 09-06-2005 at 06:53 AM.
|