The speed function in Sox, seems to be quite limited, and not as accurate then it probably can be.
For example:
150431808 samples with a ratio of 1.00048321 should become = 150504498.15394368 (but we will cut the decimals making it 150504498).
But, in Sox that will become 150359153
while in Avisynth, it will become: 150504493
Sox is very far from the precise number as you can see.
The parameter to the speed effect is a ratio of speeds, not times.
If you have a ratio of times then you must take the reciprocal, e.g.twice the time = half the speed.
In your example, 1/1.00048321 = 0.999517023379, so:
$ sox -n -n trim 0 150431808s speed 0.999517023379 rate -q stat
Samples read: 150504498
I see, thought speed ratio was the same as when changing the factor of samples.
But then , which is the correct approach, changing samples, or speed?
What iam trying to accompish is, i get a factor , for example, it runs 24ms less in 10 hours. Meaning "Duration"-24ms.
I am Not talking about trim here.
How exact can it be done?
I can get a very precise calculation of the ratio, but how precise will Sox allow?