Skip to content

Commit 0003ff5

Browse files
committed
Disable bitstream passthrough logic and UI on macOS
1 parent ae4ac8a commit 0003ff5

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/bitstream.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#[cfg(not(target_os = "windows"))]
1+
#[cfg(target_os = "linux")]
22
pub fn start_bitstream_thread(
33
file_path: &str,
44
_shared_state: std::sync::Arc<std::sync::Mutex<crate::state::AppState>>,
@@ -196,8 +196,15 @@ pub fn start_bitstream_thread(
196196
Ok((ffmpeg_thread, decoder_sample_rate as u32))
197197
}
198198

199-
200-
199+
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
200+
pub fn start_bitstream_thread(
201+
_file_path: &str,
202+
_shared_state: std::sync::Arc<std::sync::Mutex<crate::state::AppState>>,
203+
_tx: crossbeam_channel::Sender<crate::audio::DspMessage>,
204+
_stop_token: std::sync::Arc<std::sync::atomic::AtomicBool>,
205+
) -> anyhow::Result<(std::thread::JoinHandle<()>, u32)> {
206+
Err(anyhow::anyhow!("Bitstream passthrough is not supported on this platform."))
207+
}
201208
#[cfg(windows)]
202209
pub use wasapi_bitstream::start_bitstream_thread;
203210

src/engine.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,12 +2077,13 @@ impl<'a> VulkanEngine<'a> {
20772077
engine_action = EngineAction::SetForceStereo(force_stereo);
20782078
}
20792079

2080+
#[cfg(any(target_os = "windows", target_os = "linux"))]
20802081
{
20812082
let mut passthrough = state.passthrough_enabled;
20822083

20832084
#[cfg(target_os = "windows")]
20842085
let label = "Enable Bitstream Passthrough (WASAPI Exclusive)";
2085-
#[cfg(not(target_os = "windows"))]
2086+
#[cfg(target_os = "linux")]
20862087
let label = "Enable Bitstream Passthrough (PipeWire)";
20872088

20882089
if ui.checkbox(&mut passthrough, label).changed() {

0 commit comments

Comments
 (0)