uos_SeekTime and uos_InputPositionTime don't work for me

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

uos_SeekTime and uos_InputPositionTime don't work for me

fauri
Hi there!

I'm having problemas with two UOS functions: uos_SeekTime and uos_InputPositionTime.

uos_SeekTime restart the song (00:00:00); uos_InputPositionTime always returns 0 as result. This is happens with two formats that I've tried: wav and mp3, both tested while they were playing.

Tested with Lazarus 1.6.2, Windows 10, LCL and the last UOS revision.

Thanks for your attention.
Reply | Threaded
Open this post in threaded view
|

Re: uos_SeekTime and uos_InputPositionTime don't work for me

fredvs
Administrator
Hello.

Huh, It works here...

Did you enable seeking? (by default, to spare cpu usage, it is set to 0 (disabled))
It is done with:
uos_InputSetPositionEnable(Player, Input, 1);

Example:

    uos_CreatePlayer(PlayerIndex1);
    InputIndex1 := uos_AddFromFile(PlayerIndex1,(pchar(SoundFilename)));
    uos_AddIntoDevOut(PlayerIndex1);

    uos_InputSetPositionEnable(PlayerIndex1, InputIndex1, 1); // this added

    uos_Play(PlayerIndex1);
    sleep(2000);
    uos_InputPositionTime(PlayerIndex1,0);
   
Fre;D
Reply | Threaded
Open this post in threaded view
|

Re: uos_SeekTime and uos_InputPositionTime don't work for me

fauri
Oh, I didn't know... Indeed, this is worked with uos_InputPositionTime, but not with uos_SeekTime (assigning a value to this one causes the music to always go to the zero position).
In fact, I'm looking for any way to make the song move forward or backward.
Reply | Threaded
Open this post in threaded view
|

Re: uos_SeekTime and uos_InputPositionTime don't work for me

fredvs
Administrator
> but not with uos_SeekTime()

Ooops, indeed there was a problem. ;-(

Fixed in last commit: df81bc0..ebd8727

Many thanks to note it.

Fre;D

 


Reply | Threaded
Open this post in threaded view
|

Re: uos_SeekTime and uos_InputPositionTime don't work for me

fauri
It worked like a charm! But I confess I was a bit scared when I updated the files and came across some errors... Until I realized that some function names had changed, lol!

Thanks a lot, Fred!
Reply | Threaded
Open this post in threaded view
|

Re: uos_SeekTime and uos_InputPositionTime don't work for me

fredvs
Administrator
> It worked like a charm!

Ha, so I am very happy.

>  Until I realized that some function names had changed, lol!

I apologize. I worked very late and forgot to give a message here on forum.

It si done now.

Fre;D