Forum > Audio and Video

UOS Wave Demo not working. [SOLVED]

<< < (2/3) > >>

Fred vS:
Re-hello Josh.

Ok, I found a Windows 11 machine.
But not yet with Lazarus 3.5. ( only Lazarus 2.2.4 ).

And there it works. (see screenshot).

Maybe it is related with Lazarus 3.5. (but I cannot install it on that Widows 11 machine at the moment).

Josh:
Hi @Fred vS,

I used the version that came from OPM, done a complete clean all/delete  rebuild of lazarus.

Tonight if I get time, I will  install a fresh lazarus and fpc (fixes branch) x64.
and no other 3rd party components.
then install UOS from OPM and test. (state of fixes on OPM)
then install UOS from your repo and test (state of fixes on repo)

Its entirely possible, that my fixes install (upgraded many times with updates of 3rd party packages including uos via OPM) has got a little messed. I have had that happen before.

Will report back.....
TBC..

Fred vS:
Hello Josh.

In the screenshot you gave, the uos is version 2220425 (version 2 dated 2022/04/25).
So it looks like OPM has an older version of uos.
The current version (with many fixes) is 2240422 (version 2 dated 2024/04/22).

It would be great if OPM could give the latest uos commits (and that you use it too  ;) )

Josh:
Hi Fred vS,

I have tested UOS with fresh installs of  latest fixes of  x86  and x86-64.

Both OPM and repo versions of waveform player are working.
So conclusion my fixes install was somehow 'screwed'.

odd how opm version of 2022 has 2023 dlls.

Questions.
I have generated audio in a TMemoryStream, and I can Play it without issue.
(I think this may be the issue, playing from tmemorystream, rather than a file, and no I do not want to save the generated audio to file).
I cannot do the following.
1. Get positon of the playing Stream using uos_InputPositionTime, it returns 0.
2. If I try to ceate waveform data, it sort of works but it plays the complete audio first before the endproc waveform generator is run.
3. If I pause with uos_Pause(PlayerIndex1) then later call uos_PlayNoFree(PlayerIndex1) to resume play, it starts from the beginning.

I have only just starting playing with UOs, soo suspect its me... ;)

Fred vS:

--- Quote from: Josh on July 25, 2024, 04:43:30 pm ---Hi Fred vS,

I have tested UOS with fresh installs of  latest fixes of  x86  and x86-64.

Both OPM and repo versions of waveform player are working.

--- End quote ---

Nice that it works! (But better to use last uos commits  ;) )


--- Quote from: Josh on July 25, 2024, 04:43:30 pm ---Questions.
I have generated audio in a TMemoryStream, and I can Play it without issue.
(I think this may be the issue, playing from tmemorystream, rather than a file, and no I do not want to save the generated audio to file).
I cannot do the following.
1. Get positon of the playing Stream using uos_InputPositionTime, it returns 0.
2. If I try to ceate waveform data, it sort of works but it plays the complete audio first before the endproc waveform generator is run.
3. If I pause with uos_Pause(PlayerIndex1) then later call uos_PlayNoFree(PlayerIndex1) to resume play, it starts from the beginning.

I have only just starting playing with UOs, soo suspect its me... ;)

--- End quote ---

Hum, difficult to give a diagnosis without seeing the patient.

For 1.  Did you enable seek-position before play with:
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- uos_InputSetPositionEnable(PlayerIndex1, InputIndex1, 1);    You may take a look at SimplePlayer demo.

For 2. Hum, sorry but I dont understand it. I fear I will need to see your code.
 [EDIT] If you want to play the audio and have the waveform at the same time, usually I use 2 players, one to get the wavedata and the other  play the audio.  And then do uos_play(playerwavedata) followed with uos(playaudio).
Of course it will be a short delay to render the waveform depending on the size of the audio-file-memorystream-etc...
But because each player is a independent thread, one will not borrow the other.

For 3. For resume, please use uos_RePlay:
   
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uos_RePlay(PlayerIndex1);   You may also take a look at SimplePlayer demo.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version