Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 20th, 2011, 01:36 PM
Authorized User
Points: 437, Level: 7
Points: 437, Level: 7 Points: 437, Level: 7 Points: 437, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2008
Location: , , .
Posts: 85
Thanks: 10
Thanked 0 Times in 0 Posts
Default Produce 3D Sound using directx

Hi All,

I am using Directx to produce 3D sound Its working fine, But the only problem is I am not able to produce sound at a time in left or right speaker.

Could someone please tell me what value of vector I should set to produce sound in left or right speaker.

code is here:

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
            DSDevice = New DirectSound.Device()
            DSDevice.SetCooperativeLevel(Handle, DirectSound.CooperativeLevel.Normal)
            Dim BufferDesc As DirectSound.BufferDescription = New DirectSound.BufferDescription()
            BufferDesc.Control3D = True
            BufferDesc.GlobalFocus = True
            sFileName = OpenFileDialog1.FileName
            Dim TheSound As DirectSound.SecondaryBuffer = New DirectSound.SecondaryBuffer(sFileName, BufferDesc, DSDevice)
            Dim The3DBuffer As DirectSound.Buffer3D = New DirectSound.Buffer3D(TheSound)
            The3DBuffer.Position = GetVector3(0, 0, 0)
            TheSound.Play(0, BufferPlayFlags.Default)
        Catch ex As Exception
            sErrmsg = ex.Message & ex.ToString()
        End Try
    End Sub
What Value I should pass to the GetVector3(0, 0, 0) so it can produce sound in left or right speaker.

Thanks in Advance
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Develop 3D game with C# + DirectX + .NET skywalker1987 C# 1 July 18th, 2013 02:39 AM
about directx Innaorouk C# 2 August 27th, 2007 08:39 PM
Help. How to play media files using DirectX dextergaisie Pro VB 6 0 May 15th, 2007 06:09 AM
managed directx 9drawsubset problem? mmmobasher C# 0 December 1st, 2005 05:29 AM
directx programing bcmaverik VB.NET 5 January 28th, 2004 07:07 AM

All times are GMT -4. The time now is 10:22 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.