|
-
May 16th, 2004, 06:57 PM
#1
Thread Starter
Fanatic Member
Drive me INSANE (Dx8 sound)
Alright, I've got this code... I don't understand how the error can happen:
I have a general "loadsound" sub, so I don't have to look at DX code, lalala... anyways:
VB Code:
Public Sub LoadSound(ByVal Path As String, ByRef Buffer As DirectSoundSecondaryBuffer8)
Dim DsDesc As DSBUFFERDESC
DsDesc.lFlags = DSBCAPS_CTRLFREQUENCY Or DSBCAPS_CTRLPAN Or DSBCAPS_CTRLVOLUME
Set Buffer = DSound.CreateSoundBufferFromFile(App.Path & Path, DsDesc)
'ERROR: byref argument type mismatch
'DsDesc is highlighted. what could cause this?
End Sub
Don't pay attention to this signature, it's contradictory.
-
May 16th, 2004, 07:25 PM
#2
Ex-Super Mod'rater
Re: Drive me INSANE (Dx8 sound)
Originally posted by alkatran
Alright, I've got this code... I don't understand how the error can happen:
I have a general "loadsound" sub, so I don't have to look at DX code, lalala... anyways:
VB Code:
Public Sub LoadSound(ByVal Path As String, ByRef Buffer As DirectSoundSecondaryBuffer8)
Dim DsDesc As DSBUFFERDESC
DsDesc.lFlags = DSBCAPS_CTRLFREQUENCY Or DSBCAPS_CTRLPAN Or DSBCAPS_CTRLVOLUME
Set Buffer = DSound.CreateSoundBufferFromFile(App.Path & Path, DsDesc)
'ERROR: byref argument type mismatch
'DsDesc is highlighted. what could cause this?
End Sub
What type does the CreateSoundBufferFromFile() function take as the last parameter? The error is saying its not DSBUFFERDESC. If it is then put DxVBLibA.DSBUFFERDESC as the type.
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 16th, 2004, 07:26 PM
#3
Ex-Super Mod'rater
This is because your accessing both Dx7 & 8. so it doesn't know which library its getting the type from .
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 16th, 2004, 07:29 PM
#4
Thread Starter
Fanatic Member
That was actually my guess.. how do i get around the error?
Don't pay attention to this signature, it's contradictory.
-
May 16th, 2004, 07:32 PM
#5
Thread Starter
Fanatic Member
nevermind, noticed you were the same person and put DxVBLibA in front.
Don't pay attention to this signature, it's contradictory.
-
May 16th, 2004, 07:50 PM
#6
Ex-Super Mod'rater
Same person, multiple personalitys . Who said that
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|