[Update/WIP] Config Page: Device Tab. 音量チェックができるように(Dev)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
useMicVolume,
|
||||
useSpeakerVolume,
|
||||
} from "@store";
|
||||
|
||||
import { useStdoutToPython } from "./useStdoutToPython";
|
||||
@@ -8,6 +9,7 @@ import { useStdoutToPython } from "./useStdoutToPython";
|
||||
export const useVolume = () => {
|
||||
const { asyncStdoutToPython } = useStdoutToPython();
|
||||
const { updateMicVolume } = useMicVolume();
|
||||
const { updateSpeakerVolume } = useSpeakerVolume();
|
||||
|
||||
// const asyncPending = () => new Promise(() => {});
|
||||
return {
|
||||
@@ -15,6 +17,12 @@ export const useVolume = () => {
|
||||
volumeCheckStop_Mic: () => asyncStdoutToPython("/controller/callback_disable_check_mic_threshold"),
|
||||
updateVolumeVariable_Mic: (payload) => {
|
||||
updateMicVolume(payload.data);
|
||||
},
|
||||
|
||||
volumeCheckStart_Speaker: () => asyncStdoutToPython("/controller/callback_enable_check_speaker_threshold"),
|
||||
volumeCheckStop_Speaker: () => asyncStdoutToPython("/controller/callback_disable_check_speaker_threshold"),
|
||||
updateVolumeVariable_Speaker: (payload) => {
|
||||
updateSpeakerVolume(payload.data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user