geigi / cozy

🎧 Listen to audio books 📚 on Linux
https://cozy.sh
GNU General Public License v3.0
1.1k stars 85 forks source link

Rework playback architecture a bit, use nanoseconds everywhere #928

Closed rdbende closed 2 months ago

rdbende commented 3 months ago

It was kinda weird, that the setter for Player.position expected seconds, but the getter returned nanoseconds. Now every such interface should use nanoseconds, as that's what GStreamer uses internally, and we also don't have to care about floating point numbers. The database still uses seconds in some places though, but it's better this way, so no database migration is needed.

Also some bug fixes

geigi commented 2 months ago

Nice :) There were some bugs in the past caused by nanosecond / second confusion so good thing to decide for one.

rdbende commented 2 months ago

I think this is good to go now.