fix: linux audio output stream

This commit is contained in:
Tal 2025-08-09 17:51:45 +02:00
parent fa0d1f52c3
commit e4d5f8e456

View File

@ -1,10 +1,8 @@
/// This gets the output stream while also shutting up alsa with [libc].
/// Uses raw libc calls, and therefore is functional only on Linux.
#[cfg(target_os = "linux")]
pub fn silent_get_output_stream() -> eyre::Result<OutputStream, player::Error> {
use crate::player;
pub fn silent_get_output_stream() -> eyre::Result<rodio::OutputStream, crate::player::Error> {
use libc::freopen;
use rodio::OutputStream;
use rodio::OutputStreamBuilder;
use std::ffi::CString;