mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-16 10:47:21 -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:
@@ -130,11 +130,13 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state)
|
||||
closePulseOutput (opts);
|
||||
}
|
||||
|
||||
#ifndef __APPLE__
|
||||
//close OSS output
|
||||
if (opts->audio_out_type == 2 || opts->audio_out_type == 5)
|
||||
{
|
||||
close (opts->audio_out_fd);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (opts->audio_in_type == 0) //close pulse input if it is the specified input method
|
||||
{
|
||||
@@ -1585,10 +1587,12 @@ void ncursesMenu (dsd_opts * opts, dsd_state * state)
|
||||
openPulseOutput (opts);
|
||||
}
|
||||
|
||||
#ifndef __APPLE__
|
||||
if (opts->audio_out_type == 2 || opts->audio_out_type == 5)
|
||||
{
|
||||
openOSSOutput (opts);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (opts->audio_in_type == 0) //reopen pulse input if it is the specified input method
|
||||
|
||||
Reference in New Issue
Block a user