mirror of
https://github.com/talwat/lowfi
synced 2025-04-25 20:13:22 +00:00
fix: import necessary functions & types in silent_get_output_stream()
This commit is contained in:
parent
ce8f8d2845
commit
2a36bc72f3
@ -86,7 +86,10 @@ pub struct SendableOutputStream(pub rodio::OutputStream);
|
||||
// SAFETY: This is necessary because [OutputStream] does not implement [Send],
|
||||
// due to some limitation with Android's Audio API.
|
||||
// I'm pretty sure nobody will use lowfi with android, so this is safe.
|
||||
#[expect(clippy::non_send_fields_in_send_ty, reason = "this is expected because of the nature of the struct")]
|
||||
#[expect(
|
||||
clippy::non_send_fields_in_send_ty,
|
||||
reason = "this is expected because of the nature of the struct"
|
||||
)]
|
||||
unsafe impl Send for SendableOutputStream {}
|
||||
|
||||
/// Initializes the audio server, and then safely stops
|
||||
|
@ -119,6 +119,9 @@ impl Player {
|
||||
/// to simply just the audio in the bag, lil api.
|
||||
#[cfg(target_os = "linux")]
|
||||
fn silent_get_output_stream() -> eyre::Result<(OutputStream, OutputStreamHandle)> {
|
||||
use libc::freopen;
|
||||
use std::ffi::CString;
|
||||
|
||||
// Get the file descriptor to stderr from libc.
|
||||
extern "C" {
|
||||
static stderr: *mut libc::FILE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user