I am trying to use the r8brain DLL (r8b.dll) in a Visual Basic 6 application to do resampling conversions. I have tried calling the function within this DLL like I call other Windows API functions, but all I keep getting an a GPF in VB.
Here is my VB code reference:
Private Declare Sub r8b_execute Lib "r8b.dll" (ByVal InFilename As String, ByVal OutFileName As String, ByVal OutRate As Double, ByVal OutBitDepth As Long, ByVal OutQuality As Long, ByVal Preallocate As Long, CancelFlag As Long, Callback As Variant, Pointer As Double, err As Variant)
I have the r8b.dll in the source path as well as the C:\windows\system32 folder.
ANY ideas or assistance is greatly appreciated!
Hmmm...well I do not understand about VB type String. I do not think there isn't another type for character in VB 6.
I made some changes but it still causes a GPF in VB6. Here is my call that still does not work....
Private Declare Function r8b_execute Lib "r8b.dll" (ByVal InFilename As String, ByVal OutFileName As String, ByVal OutRate As Long, ByVal OutBitDepth As Long, ByVal OutQuality As Long, ByVal Preallocate As Long, ByRef CancelFlag As Long, ByRef Callback As TR8BCallback, ByRef Pointer As Long, ByRef err As TR8Error)
Public Type TR8BCallback
Position As Long
Max As Long
xPointer As Long
Public Type TR8Error
WasError As Boolean
msg As String
My function call then is:
Dim xCallback As TR8BCallback
Dim xCancelFlag As Long
Dim xError As TR8Error
Dim xPointer As Long
r8b_execute "CT1.wav", "ct1out.wav", 0.2, 16, 1, 0, xCancelFlag, xCallback, xPointer, xError
Any ideas? I really would like to get this working if possible. Thanks.
Okay, will do.
One more question, please.
In the DLL documentation it says - OutRate - sample rate of output file. Please, don't use extreme values for output sample rate. Normal "designed" input to output sample rate ratio lies
between 0.2 to 5.
So how would I determine the value to use for a sample rate of 44100 or 48000?
This topic was last updated 180 days ago, and thus it was archived. Replying is disabled for this topic.