Fix: Lautstärke während Wiedergabe steuerbar (inlineVolume immer aktiv)
Bei PCM-Memory-Cache wurde inlineVolume nur aktiviert wenn vol != 1, dadurch fehlte das Volume-Objekt auf der AudioResource und apiSetVolumeLive konnte die Lautstärke nicht live ändern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c0956fbc7e
commit
0bd31d93a8
1 changed files with 1 additions and 1 deletions
|
|
@ -532,7 +532,7 @@ async function playFilePath(guildId: string, channelId: string, filePath: string
|
||||||
if (cachedPath) {
|
if (cachedPath) {
|
||||||
const pcmBuf = getPcmFromMemory(cachedPath);
|
const pcmBuf = getPcmFromMemory(cachedPath);
|
||||||
if (pcmBuf) {
|
if (pcmBuf) {
|
||||||
resource = createAudioResource(Readable.from(pcmBuf), { inlineVolume: useVolume !== 1, inputType: StreamType.Raw });
|
resource = createAudioResource(Readable.from(pcmBuf), { inlineVolume: true, inputType: StreamType.Raw });
|
||||||
} else {
|
} else {
|
||||||
resource = createAudioResource(fs.createReadStream(cachedPath, { highWaterMark: 256 * 1024 }), { inlineVolume: true, inputType: StreamType.Raw });
|
resource = createAudioResource(fs.createReadStream(cachedPath, { highWaterMark: 256 * 1024 }), { inlineVolume: true, inputType: StreamType.Raw });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue