|
228 | 228 | <div class="label"> |
229 | 229 | <n-text class="name">音乐频谱</n-text> |
230 | 230 | <n-text class="tip" :depth="3"> |
231 | | - 开启音乐频谱会影响性能或音频输出切换等功能,如遇问题请关闭 |
| 231 | + 开启音乐频谱会影响性能或增加内存占用,如遇问题请关闭 |
232 | 232 | </n-text> |
233 | 233 | </div> |
234 | 234 | <n-switch |
@@ -342,51 +342,53 @@ const getOutputDevices = async () => { |
342 | 342 |
|
343 | 343 | // 切换输出设备 |
344 | 344 | const playDeviceChange = (deviceId: string, option: SelectOption) => { |
345 | | - if (settingStore.showSpectrums) { |
346 | | - window.$dialog.warning({ |
347 | | - title: "音频通道占用", |
348 | | - content: |
349 | | - "由于系统限制,切换音频输出设备会导致音乐频谱失效,将会关闭音乐频谱,并将于热重载后生效( 请点击右上角的设置菜单中的热重载按钮 ),是否继续?", |
350 | | - positiveText: "继续", |
351 | | - negativeText: "取消", |
352 | | - closeOnEsc: false, |
353 | | - closable: false, |
354 | | - maskClosable: false, |
355 | | - autoFocus: false, |
356 | | - onPositiveClick: () => { |
357 | | - showSpectrums.value = false; |
358 | | - settingStore.showSpectrums = false; |
359 | | - player.toggleOutputDevice(deviceId); |
360 | | - window.$message.success(`已切换输出设备为 ${option.label}`); |
361 | | - }, |
362 | | - onNegativeClick: () => { |
363 | | - settingStore.playDevice = "default"; |
364 | | - }, |
365 | | - }); |
366 | | - } else { |
367 | | - player.toggleOutputDevice(deviceId); |
368 | | - window.$message.success(`已切换输出设备为 ${option.label}`); |
369 | | - } |
| 345 | + // if (settingStore.showSpectrums) { |
| 346 | + // window.$dialog.warning({ |
| 347 | + // title: "音频通道占用", |
| 348 | + // content: |
| 349 | + // "由于系统限制,切换音频输出设备会导致音乐频谱失效,将会关闭音乐频谱,并将于热重载后生效( 请点击右上角的设置菜单中的热重载按钮 ),是否继续?", |
| 350 | + // positiveText: "继续", |
| 351 | + // negativeText: "取消", |
| 352 | + // closeOnEsc: false, |
| 353 | + // closable: false, |
| 354 | + // maskClosable: false, |
| 355 | + // autoFocus: false, |
| 356 | + // onPositiveClick: () => { |
| 357 | + // showSpectrums.value = false; |
| 358 | + // settingStore.showSpectrums = false; |
| 359 | + // player.toggleOutputDevice(deviceId); |
| 360 | + // window.$message.success(`已切换输出设备为 ${option.label}`); |
| 361 | + // }, |
| 362 | + // onNegativeClick: () => { |
| 363 | + // settingStore.playDevice = "default"; |
| 364 | + // }, |
| 365 | + // }); |
| 366 | + // } else { |
| 367 | + // player.toggleOutputDevice(deviceId); |
| 368 | + // window.$message.success(`已切换输出设备为 ${option.label}`); |
| 369 | + // } |
| 370 | + player.toggleOutputDevice(deviceId); |
| 371 | + window.$message.success(`已切换输出设备为 ${option.label}`); |
370 | 372 | }; |
371 | 373 |
|
372 | 374 | // 显示音乐频谱更改 |
373 | 375 | const showSpectrumsChange = (value: boolean) => { |
374 | 376 | if (value) { |
375 | | - if (settingStore.playDevice !== "default") { |
376 | | - window.$dialog.warning({ |
377 | | - title: "音频通道占用", |
378 | | - content: "开启音乐频谱会导致自定义音频输出设备失效,将会恢复默认输出设备,是否继续开启?", |
379 | | - positiveText: "开启", |
380 | | - negativeText: "取消", |
381 | | - onPositiveClick: () => { |
382 | | - showSpectrums.value = true; |
383 | | - settingStore.showSpectrums = true; |
384 | | - settingStore.playDevice = "default"; |
385 | | - player.toggleOutputDevice("default"); |
386 | | - }, |
387 | | - }); |
388 | | - return; |
389 | | - } |
| 377 | + // if (settingStore.playDevice !== "default") { |
| 378 | + // window.$dialog.warning({ |
| 379 | + // title: "音频通道占用", |
| 380 | + // content: "开启音乐频谱会导致自定义音频输出设备失效,将会恢复默认输出设备,是否继续开启?", |
| 381 | + // positiveText: "开启", |
| 382 | + // negativeText: "取消", |
| 383 | + // onPositiveClick: () => { |
| 384 | + // showSpectrums.value = true; |
| 385 | + // settingStore.showSpectrums = true; |
| 386 | + // settingStore.playDevice = "default"; |
| 387 | + // player.toggleOutputDevice("default"); |
| 388 | + // }, |
| 389 | + // }); |
| 390 | + // return; |
| 391 | + // } |
390 | 392 | showSpectrums.value = true; |
391 | 393 | settingStore.showSpectrums = true; |
392 | 394 | } else { |
|
0 commit comments