oss: do not fall back to write() mode on FreeBSD

This has been patched out in FreeBSD Ports for ages.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/277>
This commit is contained in:
Greg V 2020-04-02 19:13:58 +03:00 committed by PulseAudio Marge Bot
parent eccffaba26
commit de2093fcc7

View file

@ -1229,10 +1229,12 @@ int pa__init(pa_module*m) {
use_mmap = false;
}
#ifndef __FreeBSD__
if (use_mmap && mode == O_WRONLY) {
pa_log_info("Device opened for playback only, cannot do memory mapping, falling back to UNIX write() mode.");
use_mmap = false;
}
#endif
if (pa_oss_get_hw_description(dev, hwdesc, sizeof(hwdesc)) >= 0)
pa_log_info("Hardware name is '%s'.", hwdesc);