arkq / bluez-alsa

Bluetooth Audio ALSA Backend
MIT License
837 stars 187 forks source link

Cut milliseconds in sparse audio signal #163

Closed ostrosablin closed 5 years ago

ostrosablin commented 5 years ago

After last upgrade to latest bluez-alsa git version, it seems to have introduced strange cutoffs in sparse audio signals. This seems to occur only on audio signals that have true silent sections. Some examples of this is, e.g. audiofiles that are made using text-to-speech synthesizers (in this case, gaps between words would be true silence), or some chiptunes from old platforms often contained several milliseconds of true silence gaps between notes. When such files are played back via bluez-alsa sink, some milliseconds after each silence section seem to be shaved, which impairs experience. This doesn't affect most of music, because in general, average song wouldn't contain true silence in middle of song. Before updating there was no such behavior, though I can't exactly pinpoint, which commit breaks this.

ostrosablin commented 5 years ago

Also, for some reason this seems to happen only with one of my speakers, so I assume that they either using different codecs or bitrate settings, or it's the speaker itself that mishandles the packets (if encoding scheme has changed).

ostrosablin commented 5 years ago

Tried downgrade to 1.3.1, artifacts are still present. Possibly, either bluez bug, or even hardware (on speaker side). Doesn't seem to relate to bluez-alsa.