Re: Question about design

Do you mean how to send your method as a callback to bass, so it can be called when the event occurs?
Bass.Net has prepared delegates for this purpose, all you need is to pass your method with right syntax.
Just keep in mind, that those delegates are sent to Bass and thus out of garbage collector's sight. So you can't just pass the method as an argument, you need to instantiate the required delegate, initialize it with your method and keep the instance while it is needed.
You can also read about some special cases in the "Interoperating with unmanaged code" chapter of the Bass.Net documentation. It contains nice examples of how to prevent gc from confusing Bass' unmanaged part.

Best regards

Rastislav

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : nuno69 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : nuno69 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : nuno69 via Audiogames-reflector

Reply via email to