Author Topic: Creating my own mixed assembly BassASIOHandler  (Read 267 times)

Christos

  • Posts: 21
Hi there,
I am using years now the BASS.net wrapper for bass and I am very happy with it. I do though have a problem lately. As my application is huge (VB.NET WPF), if for some reason garbage collection happens or an exception might raise, this will halt the .NET platform for several milliseconds causing the asio callbacks to block and audio to be dropped. This is also verified here in the forum.

The one good solution as suggested here, is to make a bass.net bassasiohandler equivalent in managed/unmanaged c++ and with the mixed assembly be able to make it work, as I did succesfully until now. But I have a question. The BASS.NET BassAsioHandler has a property called OutputChannel, that I use basically to control the output volume to the device without affecting the original stream. I could not get this from any bass or bassasio method. How do I determine the channel feeding to asio device? Is this just a decoding stream created inside the bassasiohandler class? I am still in the output phase, and later I am going to implement it for input too. I have been told that I will find my answer in the docs when looking to the 'AssignOutputChannel' method, but I don't really understand this. Is there a hidden channel working for output to asio? Do I create one? What do I call from the native BASS library to obtain/create/fetch it?

ps. In the managed/umnanaged c++ assembly I have managed to put only whatever is only arbitrary needed just to handle the callback, no extra stuff. I dont want to make a full bassasiohandler in c++. All other methods are called and handled by my main application.

Ian @ un4seen

  • Administrator
  • Posts: 21731
Re: Creating my own mixed assembly BassASIOHandler
« Reply #1 on: 17 Apr '19 - 17:41 »
There is a not yet released BASSASIO update that allows you to provide a BASS channel handle instead of an ASIOPROC callback, which should avoid garbage collection interfering with the ASIO processing. Here is a link to that update:

   www.un4seen.com/forum/?topic=18211.msg127863#msg127863

Christos

  • Posts: 21
Re: Creating my own mixed assembly BassASIOHandler
« Reply #2 on: 19 Apr '19 - 16:50 »
Wow, didn't see that coming! ;D

Yes, output worked like a charm.

Did not make input though yet. No need for the mixed assembly (for) now.

SoundMike

  • Posts: 347
Re: Creating my own mixed assembly BassASIOHandler
« Reply #3 on: 27 Apr '19 - 02:36 »
There is a not yet released BASSASIO update that allows you to provide a BASS channel handle instead of an ASIOPROC callback, which should avoid garbage collection interfering with the ASIO processing. Here is a link to that update:

   www.un4seen.com/forum/?topic=18211.msg127863#msg127863

Is there an ETA of when this new version of BASSASIO will be released?

Ian @ un4seen

  • Administrator
  • Posts: 21731
Re: Creating my own mixed assembly BassASIOHandler
« Reply #4 on: 29 Apr '19 - 14:24 »
It probably is about time that the update was officially released. I will look into that this week.

SoundMike

  • Posts: 347
Re: Creating my own mixed assembly BassASIOHandler
« Reply #5 on: 7 May '19 - 05:16 »
Looking forward to it :)

Ian @ un4seen

  • Administrator
  • Posts: 21731
Re: Creating my own mixed assembly BassASIOHandler
« Reply #6 on: 7 May '19 - 17:58 »
BASSASIO 1.4 has now been released and is available from the BASSASIO page.