Thanks very much for your answer - understood.
Use Case background:
I am a ModelRailway Fan programing radio mobile control of locos. I identify motor sound in YouTube (e.g. howling engines - just take this as an example https://www.youtube.com/watch?v=w2FxDswFV8s&list=PL70t2tcMP0hbDb4dLbOBOcTFiZsYy2O5N&index=12
) which I copy on a controlboard. The howling engine at different rpm should become coupled to the rpm of the electromotor engine. This is driven by a Pulse Width Modulation (PWM). PWM has 255 steps.
I intend to identify appropriate sound steps corresponding to the model engine RPM (0% .... 100%) in the WAV file by the help of audacity. When controlling the electical engine by PWM I want replay the appropriate sound sniplet from the wav file. Therefore I need the exact byte position which corresponds to the intended PWM level (255 sniplets).
Calulating the offset by your proposed formula is very helpful - thank you, I wonder if the time resolution (microseconds ?) will be unique enough to jump to the before identified zero-crossings of the amplitude in order to avoid any cracks when linking neighboured sound sniplets in my program?
Supposed it is not - can I identify by programming methods (e.g. pattern matching in the wav byte sequences) the most nearby zero crossing amplitude to make up a unique marker?
Hope my language was clear enough to understand.