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.
2 parents 2080398 + c37975a commit f58dab1Copy full SHA for f58dab1
src/howler.core.js
@@ -1354,8 +1354,11 @@
1354
vol += diff * tick;
1355
1356
// Make sure the volume is in the right bounds.
1357
- vol = Math.max(0, vol);
1358
- vol = Math.min(1, vol);
+ if(diff < 0) {
+ vol = Math.max(to, vol);
1359
+ } else {
1360
+ vol = Math.min(to, vol);
1361
+ }
1362
1363
// Round to within 2 decimal points.
1364
vol = Math.round(vol * 100) / 100;
@@ -1377,7 +1380,7 @@
1377
1380
clearInterval(sound._interval);
1378
1381
sound._interval = null;
1379
1382
sound._fadeTo = null;
- self.volume(to, sound._id);
1383
+ self.volume(to, sound._id); //does this line has a sense now?
1384
self._emit('fade', sound._id);
1385
}
1386
}, stepLen);
0 commit comments