mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-16 18:57:24 -05:00
macOS: disable OSS backend cleanly and fix build/link errors
macOS has no OSS (/dev/dsp) support, but dsd-fme currently compiles and links OSS code unconditionally, leading to build and link failures. This PR: * disables OSS backend cleanly on macOS * provides a no-op openOSSOutput() stub to satisfy callers * guards OSS-specific headers and ioctl usage * preserves existing behavior on Linux/OSS platforms This allows dsd-fme to build and run correctly on macOS using PulseAudio/CoreAudio paths.
This commit is contained in:
@@ -189,6 +189,14 @@ void parse_pulse_output_string (dsd_opts * opts, char * input)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
// macOS does not support OSS (/dev/dsp).
|
||||
// Provide a stub so callers can link while using Pulse/CoreAudio backends.
|
||||
void openOSSOutput(dsd_opts *opts)
|
||||
{
|
||||
(void)opts;
|
||||
}
|
||||
#else
|
||||
void openOSSOutput (dsd_opts * opts)
|
||||
{
|
||||
int fmt;
|
||||
@@ -207,6 +215,7 @@ void openOSSOutput (dsd_opts * opts)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
fmt = 0;
|
||||
if (ioctl (opts->audio_out_fd, SNDCTL_DSP_RESET) < 0)
|
||||
{
|
||||
@@ -303,6 +312,7 @@ void openOSSOutput (dsd_opts * opts)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
processAudio (dsd_opts * opts, dsd_state * state)
|
||||
|
||||
Reference in New Issue
Block a user