Bug 245533

Summary: audio/faudio: workaround OSS audio crash
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me CC: tobik
Priority: --- Keywords: patch
Version: LatestFlags: tobik: maintainer-feedback+
jbeich: merge-quarterly-
Hardware: Any   
OS: Any   
URL: https://github.com/FNA-XNA/FAudio/issues/183
Attachments:
Description Flags
v1 none

Description Jan Beich freebsd_committer freebsd_triage 2020-04-11 12:06:56 UTC
Created attachment 213281 [details]
v1

FAudio uses fragment size not compatible with OSS backend in SDL2. Upstream blames SDL2 but fixing that maybe non-trivial because OSS has many implementations: 4Front (original), DragonFly/FreeBSD (fork), Solaris (fork), Linux (ALSA wrapper), libossaudio (SunAudio wrapper).
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2020-04-11 13:27:15 UTC
Go ahead.

Tests with the sndio backend fail too (without crashing though)
with raw devices and without intermediary sndiod.  The patch fixes
that too.
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-04-11 14:16:11 UTC
A commit references this bug:

Author: jbeich
Date: Sat Apr 11 14:15:42 UTC 2020
New revision: 531426
URL: https://svnweb.freebsd.org/changeset/ports/531426

Log:
  audio/faudio: work around OSS audio crash

  INFO: OpenAudioDevice failed: Fragment size must be a power of two

  PR:		245533
  Approved by:	tobik (maintainer)

Changes:
  head/audio/faudio/Makefile
  head/audio/faudio/files/
  head/audio/faudio/files/patch-src_FAudio__platform__sdl2.c
Comment 3 Jan Beich freebsd_committer freebsd_triage 2020-04-11 14:17:08 UTC
Do you want this on 2020Q2 or let it bake on /latest in case of regressions?
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2020-04-11 14:22:07 UTC
Merging it to 2020Q2 should be fine.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2020-04-11 14:46:29 UTC
Nevermind. 20.03 doesn't crash because https://github.com/FNA-XNA/FAudio/commit/a0f859c761bb is the culprit. Rounding up 1024 to ^2 is pointless but also harmless.