mirror of
https://github.com/talwat/lowfi
synced 2025-04-26 04:23:24 +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],
|
// SAFETY: This is necessary because [OutputStream] does not implement [Send],
|
||||||
// due to some limitation with Android's Audio API.
|
// due to some limitation with Android's Audio API.
|
||||||
// I'm pretty sure nobody will use lowfi with android, so this is safe.
|
// 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 {}
|
unsafe impl Send for SendableOutputStream {}
|
||||||
|
|
||||||
/// Initializes the audio server, and then safely stops
|
/// Initializes the audio server, and then safely stops
|
||||||
|
@ -119,6 +119,9 @@ impl Player {
|
|||||||
/// to simply just the audio in the bag, lil api.
|
/// to simply just the audio in the bag, lil api.
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
fn silent_get_output_stream() -> eyre::Result<(OutputStream, OutputStreamHandle)> {
|
fn silent_get_output_stream() -> eyre::Result<(OutputStream, OutputStreamHandle)> {
|
||||||
|
use libc::freopen;
|
||||||
|
use std::ffi::CString;
|
||||||
|
|
||||||
// Get the file descriptor to stderr from libc.
|
// Get the file descriptor to stderr from libc.
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static stderr: *mut libc::FILE;
|
static stderr: *mut libc::FILE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user