mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-12 10:34:24 +08:00
fix: 修复 Windows 音频设备函数可见性
This commit is contained in:
@@ -134,7 +134,7 @@ fn device_labels(device: &cpal::Device) -> DeviceLabels {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn find_wasapi_device(requested_device: &str) -> Result<cpal::Device> {
|
pub(crate) fn find_wasapi_device(requested_device: &str) -> Result<cpal::Device> {
|
||||||
let host = cpal::default_host();
|
let host = cpal::default_host();
|
||||||
let trimmed = requested_device.trim();
|
let trimmed = requested_device.trim();
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ use crate::auth::{SessionStore, TwoFactorService, UserStore};
|
|||||||
use crate::computer_use::ComputerUseManager;
|
use crate::computer_use::ComputerUseManager;
|
||||||
use crate::config::ConfigStore;
|
use crate::config::ConfigStore;
|
||||||
use crate::db::DatabasePool;
|
use crate::db::DatabasePool;
|
||||||
|
#[cfg(unix)]
|
||||||
|
use crate::events::MsdDeviceMediaInfo;
|
||||||
use crate::events::{
|
use crate::events::{
|
||||||
AtxDeviceInfo, AudioDeviceInfo, EventBus, HidDeviceInfo, LedState, MsdDeviceInfo,
|
AtxDeviceInfo, AudioDeviceInfo, EventBus, HidDeviceInfo, LedState, MsdDeviceInfo, SystemEvent,
|
||||||
MsdDeviceMediaInfo, SystemEvent, TtydDeviceInfo, VideoDeviceInfo,
|
TtydDeviceInfo, VideoDeviceInfo,
|
||||||
};
|
};
|
||||||
use crate::extensions::{ExtensionId, ExtensionManager};
|
use crate::extensions::{ExtensionId, ExtensionManager};
|
||||||
use crate::hid::HidController;
|
use crate::hid::HidController;
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use axum::{extract::DefaultBodyLimit, routing::delete};
|
use axum::{
|
||||||
|
extract::DefaultBodyLimit,
|
||||||
|
routing::{delete, put},
|
||||||
|
};
|
||||||
use axum::{
|
use axum::{
|
||||||
middleware,
|
middleware,
|
||||||
routing::{any, get, patch, post, put},
|
routing::{any, get, patch, post},
|
||||||
Router,
|
Router,
|
||||||
};
|
};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|||||||
Reference in New Issue
Block a user