Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 26 Aug 2011
Offline Last Active Feb 26 2012 08:29 PM

Posts I've Made

In Topic: Proper .Volume usage?

26 February 2012 - 08:32 PM

Posted Image

In Topic: [Resolved] mystery crash when playing sound 2nd time. [VB.NET2010]

22 February 2012 - 08:38 PM

Found the problem.
i didn't know you couldn't directcast a copy/clone.
you have to use the function
Device.DuplicateSoundBuffer(Source SoundBuffer, Destination SoundBuffer)
and had to go from SecondarySoundBuffer to just SoundBuffer as the type definitions.

In Topic: [Resolved] mystery crash when playing sound 2nd time. [VB.NET2010]

22 February 2012 - 03:39 AM

I finaly got it to a point where i can get an error.

An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll

Additional information: An item with the same key has already been added.

the error is at the "DIM The3DBuffer" line in this sub (complete code above.)

 Private Sub PlayStoredSoundBuffer(ByVal BufferIndexClone As SoundListDefinition, ByVal x As Double, ByVal y As Double, ByVal z As Double)
Dim The3DBuffer As New SoundBuffer3D(BufferIndexClone.Buffer)
The3DBuffer.Position = New Vector3(Convert.ToSingle(x), Convert.ToSingle(y), Convert.ToSingle(z))
BufferIndexClone.Buffer.Play(0, PlayFlags.TerminateByDistance And PlayFlags.TerminateByPriority And PlayFlags.TerminateByTime)
While BufferIndexClone.Buffer.Status = BufferStatus.Playing
End While
'I thought that disposing things was perhaps the problem - maybe i was
'cross-disposing items still in use. but that hasn't helped.
'BufferIndexClone = Nothing
End Sub

i don't get it. it's in a new thread. why is there a conflict?
just because it's the same sound?

In Topic: Looking for tutorial links

15 February 2012 - 05:26 AM

Note to self: before saying "OH! That looks good! I'll go try it!" first see if it's .NET compatible. Posted Image

In Topic: Looking for tutorial links

15 February 2012 - 04:42 AM

XAudio2 looks prety straight forward.
Thanks for the post, Dynamo, i think i'll switch and try that for a bit.
i already found more documentation for it.

Programming with DirectX : Sound in DirectX - XAudio2