Skip to content

Commit

Permalink
fix(playback): pause/play on windows, and upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Yesterday17 committed Sep 28, 2023
1 parent 889a6f8 commit 80b6140
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 309 deletions.
15 changes: 2 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ license = "Apache-2.0"
[workspace.dependencies]
log = "0.4"
uuid = { version = "1", features = ["v4"] }
reqwest = { version = "0.11.15", features = [
"rustls",
], default-features = false }
reqwest = { version = "0.11.15", features = ["rustls"], default-features = false }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.7.3"
Expand Down
8 changes: 2 additions & 6 deletions anni-playback/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,18 @@ license = "LGPL-3.0"

[dependencies]
cpal = "0.15.2"
reqwest = { version = "0", features = [
"blocking",
"rustls-tls",
], default-features = false }
reqwest = { version = "0", features = ["blocking", "rustls-tls"], default-features = false }
# symphonia = { version = "0.5.2", features = ["all"] }
symphonia = { git = "https://github.com/erikas-taroza/Symphonia", branch = "mp4-opus-improvements", default-features = false, features = [
# codecs
"aac",
"flac",
"vorbis",
# formats
"ogg",
] }
symphonia-core = { git = "https://github.com/erikas-taroza/Symphonia", branch = "mp4-opus-improvements" }
crossbeam = { version = "0.8.2", features = ["crossbeam-channel"] }
rubato = "0.12.0"
rubato = "0.14.1"
rangemap = "1.3.0"
arrayvec = "0.7.2"
ebur128 = "0.1.7"
Expand Down
4 changes: 0 additions & 4 deletions anni-playback/src/decoder/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,13 @@ impl Decoder {
InternalPlayerEvent::Play => {
self.state = DecoderState::Playing;

// Windows handles play/pause differently.
#[cfg(not(target_os = "windows"))]
if self.cpal_output.is_some() {
self.cpal_output_stream.play();
}
}
InternalPlayerEvent::Pause => {
self.state = DecoderState::Paused;

// Windows handles play/pause differently.
#[cfg(not(target_os = "windows"))]
if self.cpal_output.is_some() {
self.cpal_output_stream.pause();
}
Expand Down
2 changes: 1 addition & 1 deletion anni-playback/src/dsp/resampler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ where
)
.unwrap();

let output = rubato::Resampler::output_buffer_allocate(&resampler);
let output = rubato::Resampler::output_buffer_allocate(&resampler, false);

let input = vec![Vec::with_capacity(duration); num_channels];

Expand Down
281 changes: 0 additions & 281 deletions anni-playback/src/sources/hls.rs

This file was deleted.

1 change: 0 additions & 1 deletion anni-playback/src/sources/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU Lesser General Public License along with this program.
// If not, see <https://www.gnu.org/licenses/>.

pub mod hls;
pub mod http;
pub mod streamable;

Expand Down

0 comments on commit 80b6140

Please sign in to comment.