•      Sign In
• Create Account

#Actualwaxychicken

Posted 22 February 2012 - 03:41 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			Application.DoEvents()		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.		The3DBuffer.Dispose()		'BufferIndexClone.Buffer.Dispose()		'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?

#2waxychicken

Posted 22 February 2012 - 03:40 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.)

[pre] 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
Application.DoEvents()
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.
The3DBuffer.Dispose()
'BufferIndexClone.Buffer.Dispose()
'BufferIndexClone = Nothing
End Sub[pre]

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

#1waxychicken

Posted 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
Application.DoEvents()
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.
The3DBuffer.Dispose()
'BufferIndexClone.Buffer.Dispose()
'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?

PARTNERS