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:
Benjamin Coriou
2025-12-31 15:03:37 +01:00
parent abf28593b1
commit 83d7460a0b
4 changed files with 32 additions and 3 deletions

View File

@@ -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