mirror of
https://github.com/onyx-and-iris/meld-cli.git
synced 2026-04-08 18:33:36 +00:00
add audio gain command
This commit is contained in:
@@ -13,7 +13,7 @@ import WebSocket from 'ws'
|
||||
import cli from '../src/cli.js'
|
||||
import style from '../src/style.js'
|
||||
import { sceneHelp, sceneList, sceneSwitch, sceneCurrent } from '../src/scene.js'
|
||||
import { audioHelp, audioList, audioMute, audioUnmute, audioToggle, audioStatus } from '../src/audio.js'
|
||||
import { audioHelp, audioList, audioMute, audioUnmute, audioToggle, audioStatus, audioGain } from '../src/audio.js'
|
||||
import { streamHelp, streamStart, streamStop, streamToggle, streamStatus } from '../src/stream.js'
|
||||
import { recordHelp, recordStart, recordStop, recordToggle, recordStatus } from '../src/record.js'
|
||||
import { clipHelp, clipSave } from '../src/clip.js'
|
||||
@@ -138,6 +138,12 @@ socket.onopen = function () {
|
||||
}
|
||||
withChannel(socket, (channel) => audioStatus(channel, audioArguments[0]))
|
||||
break
|
||||
case 'gain':
|
||||
if (!audioArguments[0] || isNaN(audioArguments[1])) {
|
||||
printError('Error: Audio name and gain value are required for the gain command.')
|
||||
}
|
||||
withChannel(socket, (channel) => audioGain(channel, audioArguments[0], parseFloat(audioArguments[1])))
|
||||
break
|
||||
default:
|
||||
printHelp(audioHelp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user