cronokirby / alchemy

A discord library for Elixir
MIT License
152 stars 34 forks source link

stop resetting time when playing file #114

Closed ElinksFr closed 3 years ago

ElinksFr commented 3 years ago

This fix #108

I am not really proficient in elixir so my approach may be completly wrong.

From https://www.rfcreader.com/#rfc3550_line548:

The sampling instant MUST be derived from a clock that increments monotonically and linearly in time to allow synchronization

Previously time was set to 0 every time we played a file and thus all packets with a time already send where ignored.

cronokirby commented 3 years ago

Aha, this makes a lot of sense, and might explain some of the bugs in audio playing!