Author Topic: ASIO Problem  (Read 2302 times)

rv

  • Posts: 255
Re: ASIO Problem
« Reply #25 on: 31 Oct '18 - 18:04 »
Oh ! In fact, it is not the proc that is causing problem, but the user parameter

In fact, a simple Msgbox(_AudioStream) is causing the error too
So in fact the error is more in the line before with

_AudioStream = BASS_Mixer_StreamCreate(44100, 2, BASS_SAMPLE_FLOAT Or BASS_STREAM_DECODE)

With _AudioStream returning a HUGE value more than a 32 bit integer can deal

bass and bassmix are also the latest from stuff

Ian @ un4seen

  • Administrator
  • Posts: 21533
Re: ASIO Problem
« Reply #26 on: 31 Oct '18 - 18:11 »
What is the type of the "_AudioStream" variable? If it isn't an "int", try changing it to that.

rv

  • Posts: 255
Re: ASIO Problem
« Reply #27 on: 31 Oct '18 - 18:16 »
_AudioStream is Uint32
Returned value is = 2147483649

rv

  • Posts: 255
Re: ASIO Problem
« Reply #28 on: 31 Oct '18 - 18:22 »
wow

changing the user from Intptr to Uint32 resolved the issue


Ian @ un4seen

  • Administrator
  • Posts: 21533
Re: ASIO Problem
« Reply #29 on: 1 Nov '18 - 13:41 »
I don't think that will work in 64-bit though, because it won't match the size of a pointer. If you're using unsigned handles, you could try using "UIntPtr" (instead of "IntPtr") for the "proc" and "user" parameters.

rv

  • Posts: 255
Re: ASIO Problem
« Reply #30 on: 1 Nov '18 - 14:09 »
UIntPtr works for user but not for proc in 64 bit

rv

  • Posts: 255
Re: ASIO Problem
« Reply #31 on: 1 Nov '18 - 14:25 »
OK, finally, I have set IntPtr for proc and UintPtr for user
And set value -1 directly for proc
And the UInt32 value of the Bass mixer handle

Works on 32 and 64 bit