Programming => Graphics and Multimedia => Audio and Video => Topic started by: Lulu on December 07, 2021, 06:13:05 pm
Title: problem for exiting from an app that use UOS
Post by: Lulu on December 07, 2021, 06:13:05 pm
Hello Fred, Thanks you for sharing your UOS project ! I played a little with the example 'simpleplayer_noflat' and when I exit the application sometime it appear an SIGSEGV exception. I see in your code that you use Sleep before freeing the player:
Is Sleep here to wait for the termination of the thread used by Tuos_Player ? If yes, could you implement please, a proper way to quit the application without this problem ? Searching in this forum I found this link, may be it can help. https://forum.lazarus.freepascal.org/index.php/topic,39761.msg273898.html (https://forum.lazarus.freepascal.org/index.php/topic,39761.msg273898.html) Thanks
EDIT: I've changed sleep(500) to sleep(1000) and the exception doesn't raise any more
Title: Re: problem for exiting from an app that use UOS
Post by: Fred vS on December 08, 2021, 12:30:35 pm
Hello Lulu.
I strongly recommend to use uso_flat.pas for your applications. All the demos in /uos/examples/ use uos_flat.pas (apart the one you tried and you did see the possible problems).
uos_flat.pas does care of creation and destroy of players and many other things.
Is there a reason why you prefer to not use uos_flat.pas ?
There is a uos forum who centralizes all the questions, you are welcome there. http://uos-forum.108.s1.nabble.com/
Thanks.
Fre;D
Title: Re: problem for exiting from an app that use UOS
Post by: Lulu on December 08, 2021, 02:23:21 pm
Thanks you Fred for your answer. There is no reason to use uos instead of uos_flat. Ok, I continue my uos journey on another example ! The forum is interesting, thanks !