We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8362b75 commit c37975aCopy full SHA for c37975a
src/howler.core.js
@@ -1216,8 +1216,11 @@
1216
vol += diff * tick;
1217
1218
// Make sure the volume is in the right bounds.
1219
- vol = Math.max(0, vol);
1220
- vol = Math.min(1, vol);
+ if(diff < 0) {
+ vol = Math.max(to, vol);
1221
+ } else {
1222
+ vol = Math.min(to, vol);
1223
+ }
1224
1225
// Round to within 2 decimal points.
1226
vol = Math.round(vol * 100) / 100;
@@ -1239,7 +1242,7 @@
1239
1242
clearInterval(sound._interval);
1240
1243
sound._interval = null;
1241
1244
sound._fadeTo = null;
- self.volume(to, sound._id);
1245
+ self.volume(to, sound._id); //does this line has a sense now?
1246
self._emit('fade', sound._id);
1247
}
1248
}, stepLen);
0 commit comments