natanbc / lavadsp

A bunch of lavaplayer audio filters
Apache License 2.0
60 stars 22 forks source link

Volume 0 causes exception #70

Closed freyacodes closed 3 years ago

freyacodes commented 3 years ago

Setting the volume filter with a factor of 0 causes an exception here: https://github.com/natanbc/lavadsp/blob/fc902629469ab31bb2d8aa52e55cd88a98477d73/src/main/java/com/github/natanbc/lavadsp/volume/VolumePcmAudioFilter.java#L46

This is inconsistent with the javadoc: https://github.com/natanbc/lavadsp/blob/fc902629469ab31bb2d8aa52e55cd88a98477d73/src/main/java/com/github/natanbc/lavadsp/volume/VolumePcmAudioFilter.java#L8

This is a problem in Lavalink as it is no longer possible to mute a player. Instead, all tracks get skipped.

natanbc commented 3 years ago

Fixed in https://github.com/natanbc/lavadsp/commit/c9feffd281ef77c9bcb3e9a976a15f168bae24a6