Skip to content

Commit

Permalink
Revert "build sound players differently per OS [ci-build]"
Browse files Browse the repository at this point in the history
This reverts commit d5a5c66.
  • Loading branch information
prixt committed Feb 17, 2020
1 parent 5ad725a commit 17e4589
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release -vv
args: --release --verbose

- name: Upload Release Assets
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release -vv
args: --release --verbose

- name: Upload Release Assets
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release -vv
args: --release --verbose

- name: Upload Release Assets
uses: actions/upload-release-asset@v1
Expand Down
4 changes: 0 additions & 4 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct SoundFile {
pub r#type: SoundFileType, // path to audio file with sound. OR list of paths
pub weight: f32, // controls likelihood of sound to be chosen. Default is 100.
pub volume: f32, // adjusts volume of sample. Can range from -40 to +6 decibles, default 0.
pub random_balance: bool, // if set to true will randomly distribute sound between stereo channels.
pub random_balance: bool, // if set to true will randomply distribute sound between stereo channels.
pub delay: usize, // number, delay before sound is played. In miliseconds, default 0.
pub balance: f32, // adjusts stereo channel, can range for -1 (full left) to 1 (full right).
}
Expand Down
15 changes: 7 additions & 8 deletions src/sound/sound_channel/loop_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl LoopPlayer {
}
}

fn append_source<S>(&mut self, source: S, source_volume: f32, balance: f32)
fn append_source<S>(&mut self, source: S, source_volume: f32, _balance: f32)
where
S: Source + Send + 'static,
S::Item: Sample + Send
Expand Down Expand Up @@ -151,13 +151,12 @@ impl LoopPlayer {
}
).convert_samples::<f32>();
// TODO: make Spatial work in here!!
#[cfg(not(taget_os="windows"))]
let source = Spatial::new(
source,
[balance, 1.0, 0.0],
[-1.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
);
// let source = Spatial::new(
// source,
// [_balance, 1.0, 0.0],
// [-1.0, 0.0, 0.0],
// [1.0, 0.0, 0.0],
// );
self.in_queue.fetch_add(1, Ordering::SeqCst);
let source = source::Done::new(source, self.in_queue.clone());
self.sleep_until_end = Some(self.queue_tx.append_with_signal(source));
Expand Down
15 changes: 7 additions & 8 deletions src/sound/sound_channel/oneshot_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl OneshotPlayer {
device: &Device,
source: S,
source_volume: f32,
balance: f32
_balance: f32
)
where
S: Source + Send + 'static,
Expand Down Expand Up @@ -106,13 +106,12 @@ impl OneshotPlayer {
}
).convert_samples::<f32>();
// TODO: make Spatial work in here!!
#[cfg(not(taget_os="windows"))]
let source = Spatial::new(
source,
[balance, 1.0, 0.0],
[-1.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
);
// let source = Spatial::new(
// source,
// [_balance, 1.0, 0.0],
// [-1.0, 0.0, 0.0],
// [1.0, 0.0, 0.0],
// );
let source = source::Done::new(source, control_b.count.clone());
play_raw(device, source);
self.controls.push(control);
Expand Down

0 comments on commit 17e4589

Please sign in to comment.