uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

bfb101
Hi,

It seems that uos_EndProc(myplayerindex,@mycallbackprocedure) is not working in the latest version of uos (v 2.0.1) running on linux 64-bit xfce.

In particular, uos_EndProc is not working in any of the uos example programs present in uos version 2.0.1, such as 'MultiInput' or 'WaveForm'. The 'Play' buttons remain disabled after a sound plays, 'Stop' buttons remain enabled, etc.

However, uos_EndProc in uos v1.0.7 is working on linux 64-bit xfce, but that uos version does not have the play-from-tmemorystream capabilities which I need.

I should note that the play-from-tmemorystream capabilities of the latest uos (v 2.0.1) work well on linux 64-bit xfce - the only stumbling block is that uos_EndProc() seems to be failing as indicated above. Please also note that I am using uos with lazarus.

Any help would be appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

fredvs
Administrator
Hello.

Hum, strange, i will take a look asap.

Write you later.

Thanks to note this.

Fre;D
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

fredvs
Administrator
In reply to this post by bfb101
Re-hello.

About endproc() and multi-input example.

Indeed (and of course) endproc() is not working with multi-input example because this demo use a endless-wave.
So there is no end...
I will update the multi-input demo (and delete that endproc() line).

About endproc() and waveform example.
On my Linux 64 it works ok, what appends with your system?

Fre;D
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

bfb101
Thanks Fre;D for the quick response.

Appreciate the multi-input demo changes you plan to make.

Regarding the waveform demo, it is still not working (waveform also doesn't appear in example program when loading a test sound).

' On my Linux 64 it works ok, what appends with your system?  '

Since I am somewhat of a novice, can you explain what I can do to give you some debugging feedback that may solve the general endproc() obstacle I'm experiencing in v2.0.1 ?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

fredvs
Administrator
Re-hello.

OK, I re-installed Lazarus and try the demos (I use actually only console or MSEgui or fpGUI).

Indeed, there was a problem with EndProc() and LCL (Lazarus widget-set).

It seems that, queue() in last fpc 3.0.x has problems with LCL (Lazarus widget-set).
So, for EndProc(), uos will use synchronize() again like in old uos release.

Could you try last commit 68d1532..660b37c ?

Thanks.

Fre;D
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

bfb101
EndProc() now working well !!

Many thanks for the modifications.

The Waveform is now appearing in the waveform example demo program, and the procedure associated with endproc() is executed without problem when sound play ends. Thank you very much.

Unfortunately I now find that the procedure associated with uos_loopProcin() is executed while the sound is being for the first time, but not if the sound is played again immediately if looping is needed.

I think I will open a separate post for uos_loopProcin() to avoid diluting this current post which has been solved thanks to your efforts.

Thanks again.


Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

Abrax
In reply to this post by fredvs
Hello,

I don't want to open a new topic to my uos_EndProc problem on Windows, but there is some issue with this procedure yet. Actually, I use your package under the Typhon IDE (FPC 3.1.1) to play .mp3 files from a playlist. Everything Works fine, exept the uos_EndProc which doesn't fire at the end of the .mp3 files.

I tried your SimplePlayer example. I inserted a MessageDlg in to the ClosePlayer1 procedure, to show when the uos_EndProc fireing. First time with the default test.mp3 file it works fine, at the end of the music the dialog pops up. But if I choose a new file using the OpenDialog, even the same test.mp3, the MessageDlg no longer pops up.

Back to my own program the BeginProc, LoopBeginProc, LoopEndProc works fine, but the EndProc doesn't. I use the latest source from the github.

Please give me some advice.

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

fredvs
Administrator
This post was updated on .
Hello.

Hum, strange...

Here on Linux Debian 9.5 64 bit Xfce it works fine with fpc 3.0.4. (not tested with 3.1.1).
[EDIT] Tested also from demo of CodeTyphon/CodeOcean and  fpc 3.1.1 and it works ok.

For Windows, I do not have a Windows machine here to test now.

Could you try this:

From last commit (of today), change in uos.pas, at line 7082 --->  thethread.synchronize() with thethread.queue()

----------

procedure Tuos_Player.DoEndProc;
...

{$IF not DEFINED(Library)}
  if EndProc <> nil then

// change this at line 7082:
thethread.synchronize(thethread,EndProc);//  Execute EndProc procedure

// with this:
thethread.queue(thethread,EndProc);//  Execute EndProc procedure

...

Is it better ?

Do yo have the same problems with fpc 3.0.4 ?


Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

fredvs
Administrator
Re-hello.

And if you use uos_EndProcOnly() in place of uos_EndProc(), is it working ?

(EndProc() is the procedure of object to execute  at end)
(EndProcOnly() is the procedure  (not of object) to execute at end)

Do you have the EndProc problem for Linux and/or Windows?
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

fredvs
Administrator
Re-hello.

OK, installed last CodeTyphon 6.1 with fpc 3.1.1 on Windows 10 64 bit.

Tested CodeTyphon/CodeOcean demo uos SimplePlayer --> all ok, EndProc is working, even choosing other audio-files.

But maybe I miss something.
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

Abrax
Hello,

Thank you for your effort. I will try all of your suggestions and report the results. The final target is a Raspberry Pi, so I can compile it to Linux too. I use the CodeTyphon Ver. 6.40, which is the last reliable IDE.
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

Abrax
Hello again,

I didn't have to try every suggestion, because I found some workaround. Similarly to your experience compiled the source on 64 bit IDE, and running on 64 bit Win everything works fine. On RPi it is also OK. The only exepcion, when I compile on 32 bit IDE, and running the 32 bit .exe on 64 bit Win. For the sake of certainty I will try the  32 bit IDE / 32 bit Win combo too, but the suitable tablet is at home.
Reply | Threaded
Open this post in threaded view
|

Re: uos_EndProc not working on linux 64-bit xfce using uos v2.0.1 ?

fredvs
Administrator
Hello.

> The only exepcion, when I compile on 32 bit IDE, and running the 32 bit .exe on 64 bit Win.

Ha, I did not try this.

I will take a look at this asap (when I re-find a Windows machine).

Fre;D