Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
roderickvd committed Mar 12, 2021
1 parent 972df15 commit bc05e7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/play.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use librespot::core::authentication::Credentials;
use librespot::core::config::SessionConfig;
use librespot::core::session::Session;
use librespot::core::spotify_id::SpotifyId;
use librespot::playback::config::PlayerConfig;
use librespot::playback::config::{AudioFormat, PlayerConfig};

use librespot::playback::audio_backend;
use librespot::playback::player::Player;
Expand All @@ -16,6 +16,7 @@ fn main() {

let session_config = SessionConfig::default();
let player_config = PlayerConfig::default();
let audio_format = AudioFormat::default();

let args: Vec<_> = env::args().collect();
if args.len() != 4 {
Expand All @@ -35,7 +36,7 @@ fn main() {
.unwrap();

let (mut player, _) = Player::new(player_config, session.clone(), None, move || {
(backend)(None)
(backend)(None, audio_format)
});

player.load(track, true, 0);
Expand Down

0 comments on commit bc05e7f

Please sign in to comment.