默认禁用 使用设备能处理的最大声道数输出音频 设置,修复高级音频API与自定义音频输出设备功能冲突的提示显示
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
|
||||
<script setup>
|
||||
import { computed } from '@common/utils/vueTools'
|
||||
import { appSetting, updateSetting } from '@renderer/store/setting'
|
||||
import { setMediaDeviceId } from '@renderer/plugins/player'
|
||||
import { appSetting, saveMediaDeviceId, updateSetting } from '@renderer/store/setting'
|
||||
// import AddPitchShifterPresetBtn from './AddPitchShifterPresetBtn.vue'
|
||||
// import { getUserPitchShifterPresetList, removeUserPitchShifterPreset } from '@renderer/store/soundEffect'
|
||||
// import { semitones } from '@renderer/plugins/player'
|
||||
@@ -37,7 +38,11 @@ import { appSetting, updateSetting } from '@renderer/store/setting'
|
||||
|
||||
const playbackRate = computed(() => appSetting['player.soundEffect.pitchShifter.playbackRate'])
|
||||
|
||||
const handleSetPreset = (value) => {
|
||||
const handleSetPreset = async(value) => {
|
||||
if (appSetting['player.mediaDeviceId'] != 'default') {
|
||||
await setMediaDeviceId('default').catch(_ => _)
|
||||
saveMediaDeviceId('default')
|
||||
}
|
||||
updateSetting({ 'player.soundEffect.pitchShifter.playbackRate': value })
|
||||
}
|
||||
|
||||
@@ -48,7 +53,7 @@ const handleSetPreset = (value) => {
|
||||
|
||||
const handleUpdatePlaybackRate = (value) => {
|
||||
value = parseFloat((Math.round(value) / 100).toFixed(2))
|
||||
handleSetPreset(value)
|
||||
void handleSetPreset(value)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user