Bug 245533 - audio/faudio: workaround OSS audio crash
Summary: audio/faudio: workaround OSS audio crash
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL: https://github.com/FNA-XNA/FAudio/iss...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-04-11 12:06 UTC by Jan Beich
Modified: 2020-04-11 14:46 UTC (History)
1 user (show)

See Also:
tobik: maintainer-feedback+
jbeich: merge-quarterly-


Attachments
v1 (1.76 KB, patch)
2020-04-11 12:06 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.