Skip to content

Commit

Permalink
bump to v1.4.7
Browse files Browse the repository at this point in the history
[ci-build]
  • Loading branch information
prixt committed Feb 27, 2020
1 parent 2ffda55 commit 50222cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "soundsense-rs"
version = "1.4.6"
version = "1.4.7"
build = "build.rs"
authors = ["prixt <paraxite@naver.com>"]
edition = "2018"
Expand Down
5 changes: 1 addition & 4 deletions src/sound/sound_channel/loop_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ impl LoopPlayer {
play_raw(device, queue_rx);
Self {
queue_tx,
queue_count: 0,
local_volume,
total_volume,
stopped: Arc::new(AtomicBool::new(false)),
Expand Down Expand Up @@ -195,7 +194,6 @@ impl LoopPlayer {
);
self.sleep_until_end = Some(self.queue_tx.append_with_signal(source));
}
self.queue_count+=1;
}

/// Maintain the loop.
Expand All @@ -215,8 +213,7 @@ impl LoopPlayer {
/// Triggerd when the current source ends.
/// If there are no more sources in queue, rotated the files deque, and appends the first file.
fn on_source_end(&mut self, rng: &mut ThreadRng) {
self.queue_count-=1;
if self.queue_count == 0 && !self.files.is_empty() && !self.stopped.load(Ordering::Relaxed)
if !self.files.is_empty() && !self.stopped.load(Ordering::Relaxed)
{
self.files.rotate_left(1);
self.append_file(rng);
Expand Down

0 comments on commit 50222cd

Please sign in to comment.