Robyer / foo-httpcontrol

Automatically exported from code.google.com/p/foo-httpcontrol
2 stars 2 forks source link

Increase precision of relative seek function #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using default or ajquery or other interfaces (I use FooMote and 
foobar2000controller) when you are playing a long track (such as a 2hr radio 
show or mix) and the resolution of the seek bar is several minutes. If you try 
to click just a few seconds away on the seekbar, or click the seek forwards 
buttons on the other interfaces, you skip repeatedly to the same place rather 
than forwards. I assume this is the convertStrToF limitation on line 2089 of 
controlserver.cpp, but this is a guess.

What is the expected output? What do you see instead?
I would want the resolution to be 20 times finer, so that you can skip just a 
few seconds forwards or backwards.

What version of the product are you using? On what operating system?
1-0-2 on Win 7 x64

Please provide any additional information below.
When I click the seek forwards buttons on FooMote or foobar2000controller, 
foobar2000 seeks repeatedly to the same place around 10 or 15 times, then 
suddenly skips forwards by quite a large jump. I think this is because the 
interfaces are keeping track of the time they think is current, and adding a 
small amount each time I press the seek fwds. When this small amount goes 
beyond the resolution of httpcontrol foobar2000 jumps forwards.

Original issue reported on code.google.com by technica...@gmail.com on 11 Aug 2013 at 3:57

GoogleCodeExporter commented 9 years ago
Sorry - sentence has an "and" and shouldn't, ie:

Using default or ajquery or other interfaces (I use FooMote and 
foobar2000controller) when you are playing a long track (such as a 2hr radio 
show or mix), the resolution of the seek bar is several minutes.

Original comment by technica...@gmail.com on 11 Aug 2013 at 3:58

GoogleCodeExporter commented 9 years ago
indeed, implemented Seek command accepts integer percent as a desired seek 
position, and on lenghty tracks the lowest seek value of 1% reaches minutes.
the proper place to fix that is:
http://code.google.com/p/foo-httpcontrol/source/browse/trunk/foo_httpcontrol/src
/commands.cpp#203

you'll have to replace atoi() call to atof(). beside that, clients issuing Seek 
command must be patched to support floating point seek position parameter as 
well, which now is rounded to integer (at least ajquery does that).

SeekDelta command (cmd_seekdelta()) should be modified accordingly, although 
I'm not aware whether anybody is using it.

also, I see these functions lack input value validation, which definitely won't 
hurt to have...

Original comment by oblikoamorale@gmail.com on 11 Aug 2013 at 4:24

GoogleCodeExporter commented 9 years ago

Original comment by oblikoamorale@gmail.com on 2 Mar 2014 at 5:48