Skip to content

Commit

Permalink
[Experiment] testing the audio playback speed with medium settings
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Nov 23, 2021
1 parent 4ba11c7 commit 5b19d81
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions modules/Music.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ class Music {
leaveOnEmptyCooldown: 60 * 1000 * 3,
bufferingTimeout: 200,
leaveOnEmpty: true,
ytdlOptions: {
quality: "highestaudio",
filter: "audioonly",
highWaterMark: 1 << 25,
dlChunkSize: 20,
},
metadata: {
channel: command ?? undefined,
},
Expand All @@ -50,7 +56,9 @@ class Music {
});
if (await playdl.so_validate(track.url)) {
let soundCloudInfo = await playdl.soundcloud(track.url);
return (await playdl.stream_from_info(soundCloudInfo)).stream;
return (
await playdl.stream_from_info(soundCloudInfo, { quality: 1 })
).stream;
}
return;
}
Expand All @@ -66,10 +74,10 @@ class Music {
let youtube = await playdl.search(`${spotifyInfo.name}`, {
limit: 2,
});
return (await playdl.stream(youtube[0].url)).stream;
return (await playdl.stream(youtube[0].url, { quality: 1 })).stream;
}

return (await playdl.stream(track.url)).stream;
return (await playdl.stream(track.url, { quality: 1 })).stream;
}
},
});
Expand Down

0 comments on commit 5b19d81

Please sign in to comment.