mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Speed up loading of files by requesting file and key in parallel.
This commit is contained in:
parent
c5fcdfd43c
commit
a3c63b4e05
1 changed files with 3 additions and 3 deletions
|
@ -561,11 +561,11 @@ impl PlayerInternal {
|
||||||
.session
|
.session
|
||||||
.audio_key()
|
.audio_key()
|
||||||
.request(track.id, file_id)
|
.request(track.id, file_id)
|
||||||
.wait()
|
let encrypted_file = AudioFile::open(&self.session, file_id);
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let encrypted_file = AudioFile::open(&self.session, file_id).wait().unwrap();
|
|
||||||
|
|
||||||
|
let encrypted_file = encrypted_file.wait().unwrap();
|
||||||
|
let key = key.wait().unwrap();
|
||||||
let mut decrypted_file = AudioDecrypt::new(key, encrypted_file);
|
let mut decrypted_file = AudioDecrypt::new(key, encrypted_file);
|
||||||
|
|
||||||
let normalisation_factor = match NormalisationData::parse_from_file(&mut decrypted_file) {
|
let normalisation_factor = match NormalisationData::parse_from_file(&mut decrypted_file) {
|
||||||
|
|
Loading…
Reference in a new issue