mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
bugfix:audio input remains.
This commit is contained in:
parent
e073eed95c
commit
3de900fbdf
4
client/demo/dist/index.js
vendored
4
client/demo/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -31,7 +31,7 @@ export const AppStateProvider = ({ children }: Props) => {
|
||||
useEffect(() => {
|
||||
if (clientState.clientState.initialized) {
|
||||
initializedRef.current = true
|
||||
|
||||
console.log("Updating Client Setting.................................", clientState.clientState.clientSetting.clientSetting)
|
||||
clientState.clientState.clientSetting.updateClientSetting({
|
||||
...clientState.clientState.clientSetting.clientSetting, speakers: [
|
||||
{
|
||||
|
@ -22,12 +22,6 @@ export const AudioInputRow = (_props: AudioInputRowProps) => {
|
||||
}
|
||||
}, [guiState.inputAudioDeviceInfo, appState.clientSetting.clientSetting.audioInput])
|
||||
|
||||
useEffect(() => {
|
||||
if (guiState.audioInputForGUI == "file") {
|
||||
} else {
|
||||
appState.clientSetting.updateClientSetting({ ...appState.clientSetting.clientSetting, audioInput: guiState.audioInputForGUI })
|
||||
}
|
||||
}, [guiState.audioInputForGUI, appState.clientSetting.updateClientSetting])
|
||||
|
||||
const audioInputRow = useMemo(() => {
|
||||
return (
|
||||
@ -36,6 +30,9 @@ export const AudioInputRow = (_props: AudioInputRowProps) => {
|
||||
<div className="body-select-container">
|
||||
<select className="body-select" value={guiState.audioInputForGUI} onChange={(e) => {
|
||||
guiState.setAudioInputForGUI(e.target.value)
|
||||
if (guiState.audioInputForGUI != "file") {
|
||||
appState.clientSetting.updateClientSetting({ ...appState.clientSetting.clientSetting, audioInput: e.target.value })
|
||||
}
|
||||
}}>
|
||||
{
|
||||
guiState.inputAudioDeviceInfo.map(x => {
|
||||
@ -46,7 +43,7 @@ export const AudioInputRow = (_props: AudioInputRowProps) => {
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}, [guiState.inputAudioDeviceInfo, guiState.audioInputForGUI])
|
||||
}, [guiState.inputAudioDeviceInfo, guiState.audioInputForGUI, appState.clientSetting.clientSetting, appState.clientSetting.updateClientSetting])
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user