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:
  1. Public Sub LoadSound(ByVal Path As String, ByRef Buffer As DirectSoundSecondaryBuffer8)
  2. Dim DsDesc As DSBUFFERDESC
  3.    
  4.     DsDesc.lFlags = DSBCAPS_CTRLFREQUENCY Or DSBCAPS_CTRLPAN Or DSBCAPS_CTRLVOLUME
  5.    
  6.     Set Buffer = DSound.CreateSoundBufferFromFile(App.Path & Path, DsDesc)
  7. 'ERROR: byref argument type mismatch
  8. 'DsDesc is highlighted. what could cause this?
  9. End Sub