Skip to content

Commit

Permalink
* fixed threshold filtering not working properly
Browse files Browse the repository at this point in the history
* updated macos screenshot
[ci-build]
  • Loading branch information
prixt committed Mar 6, 2020
1 parent c7cdfb8 commit 625bae9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified screenshots/macos-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/sound/sound_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl SoundManager {
match attr_value {
"singleEager" => play_type = ChannelPlayType::SingleEager,
"singleLazy" => play_type = ChannelPlayType::SingleLazy,
"total" => (),
"all" => (),
other => {
warn!("Unknown Channel PlayType: {}", other);
warn!("Will ignore this value.");
Expand Down Expand Up @@ -525,7 +525,7 @@ impl SoundManager {
trace!(" can't play: failed probability roll");
}
}
can_play &= self.total_threshold > sound.playback_threshold;
can_play &= self.total_threshold >= sound.playback_threshold;
if !can_play {
trace!(
" can't play: at threshold limit - sound.playback_threshold: {}, total_threshold: {}",
Expand Down Expand Up @@ -571,7 +571,7 @@ impl SoundManager {
sound.concurency.unwrap(), chn_len);
}
// Check if the playback_threshold is higher than the channel threshold.
else if chn_threshold <= sound.playback_threshold {
else if chn_threshold < sound.playback_threshold {
trace!(" can't play: at threshold limit - sound.playback_threshold: {}, channel_threshold: {}",
sound.playback_threshold, chn_threshold);
}
Expand Down Expand Up @@ -611,7 +611,7 @@ impl SoundManager {
trace!(" can't play: at concurency limit - limit {}, channel {}",
sound.concurency.unwrap(), chn_len);
}
else if chn_threshold <= sound.playback_threshold {
else if chn_threshold < sound.playback_threshold {
trace!(" can't play: at threshold limit - sound.playback_threshold: {}, channel_threshold: {}",
sound.playback_threshold, chn_threshold);
}
Expand Down

0 comments on commit 625bae9

Please sign in to comment.