09-05-2005, 11:03 PM
Join Date: Sep 2005
DirectSound, multiple sounds in vb .net
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 =/
*i've been reading up a bit more and i need 2 create multiple sound buffers, and i tried 'my' version of multiple buffers
Public Class Form1
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
_dev1 = New Device
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
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)
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)
**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.