Skip to content

Commit

Permalink
Apply seek before audio encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Brainicism committed Oct 25, 2024
1 parent 9f78dd6 commit 20cb624
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"damerau-levenshtein": "^1.0.8",
"dotenv": "^16.4.5",
"ejs": "^3.1.10",
"eris": "https://github.com/Brainicism/eris#a412bb3",
"eris": "https://github.com/Brainicism/eris#bfae71e",
"eris-fleet": "https://github.com/Brainicism/eris-fleet#9916334",
"eris-pagination": "https://github.com/Brainicism/eris-pagination#9a112cb",
"fastify": "^4.28.1",
Expand Down
4 changes: 1 addition & 3 deletions src/structures/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,6 @@ export default abstract class Session {
songDuration = 252;
}

const stream = fs.createReadStream(songLocation);

logger.info(
`${getDebugLogHeader(
messageContext,
Expand Down Expand Up @@ -869,7 +867,7 @@ export default abstract class Session {
voiceDataTimeout = 2000;
}

this.connection.play(stream, {
this.connection.play(songLocation, {
inputArgs,
encoderArgs: Object.entries(encoderArgs).flatMap((x) => [
x[0],
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1614,9 +1614,9 @@ eris-reactions@^0.1.4:
resolved "https://registry.yarnpkg.com/eris-reactions/-/eris-reactions-0.1.4.tgz#4b642f7411144f164b6097138c262eac6b03def1"
integrity sha512-U2rMtfywnhh4TmqFcF7uo/ciyQN8vb9ptwSJMQs/uaY1a401f+t3sei1R3IR2gYqaFejJzgjTmzBMT6jIBPYYQ==

"eris@https://github.com/Brainicism/eris#a412bb3":
"eris@https://github.com/Brainicism/eris#bfae71e":
version "0.1.0-dev"
resolved "https://github.com/Brainicism/eris#a412bb30a434a788d26a9d6550237d7e00b87cd0"
resolved "https://github.com/Brainicism/eris#bfae71ece61ff6d3cd594e45a31ed7c6ebacfe53"
dependencies:
ws "^8.2.3"
optionalDependencies:
Expand Down

0 comments on commit 20cb624

Please sign in to comment.