stsaz / fmedia

fast audio player/recorder/converter
BSD 2-Clause "Simplified" License
217 stars 21 forks source link

Possibility to start audio file at specific time #32

Closed SimonCoFox closed 5 years ago

SimonCoFox commented 5 years ago

Hi again,

for my project it would be very helpful to be able to read out at which point in the file fmedia currently is while playing an AudioFile, timestamp in ms or sample count etc. I managed to get the current samples count using --debug and looking for the tui.tui: 13:02:07.917 [debug] tui.tui: *1: samples: +1152 [483840] at 482688 I think there is a more convenient way since you are able in your tui to display the current timestamp, unfortunately I didn´t figure out how to read that out of fmedia.

Any help would be appreciated. Thanks a lot.

Best Regards, Simon

stsaz commented 5 years ago

Analyzing data from debug log automatically is little bit risky - this behaviour can change at any moment. But if you execute fmedia binary - it's the only way you can see the samples number. Use functionality from core.so and other modules directly and you will have more flexibility. See src/main.c code how it's done.