Kode / Kha

Ultra-portable, high performance, open source multimedia framework.
http://kha.tech
zlib License
1.49k stars 174 forks source link

Added on finished callback for audio channels. #1252

Closed mundusnine closed 2 years ago

RobDangerous commented 3 years ago

Uh oh, you are calling the callback in the audio-thread, that's going to cause havoc.

RobDangerous commented 2 years ago

Had a closer look at the whole situation and it's not worth it to put in some thread-safe callback-mechanism when there's the alternative to just check the finished-property - which is a much easier and more efficient way of doing things in a multithreaded situation. Sorry. But on the positive side, that made me also have a closer look at the current code and the AudioChannel-properties are now truly thread-safe.