mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Fix example
This commit is contained in:
parent
5257be7824
commit
6379926eb4
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue