On Fri, May 24 2019, Charlene Wendling <juliana...@posteo.jp> wrote: > Hi, > > On Fri, 24 May 2019 13:41:32 +0200 > Christian Weisgerber wrote: > >> Charlene Wendling: >> >> > - It doesn't build with ports-gcc (macppc [0], sparc64 [1]) >> > >> > The problem here is again a macro vs function issue. I've applied >> > the same thing upstream still does on audacious proper [2]: >> > undef'ing feof(3). >> >> That part is fine. >> >> > - At least on macppc, it does some white noise during playback >> > >> > After poking around, i've found out it was a bit depth issue when >> > the related audio setting is on "automatic". Setting manually to >> > 16 bit fixed the issue, but it's supposed to work... >> > automatically. >> > >> > mpv does things differently [3] and i have no sound issues >> > (excepted for CDDA) on macppc. So after comparing their work, and >> > reading the sio_open(3) manpage, i've changed some parameters to >> > make it work ootb. >> >> I object. This cannot be correct. fdata->bytes can't be wrong, >> we're getting it from our own table, and otherwise you're nailing >> everything to signed native endian, no matter what the actual input >> format is. You are hiding the actual bug. > > You're right. In fact, it has been "fixed" again. > > After rebuilding audacious-plugins in my chroot where i do port > works/tests, with your diff and without my sndio changes. It > appears that it works. Since your diff add only debug infos, > i was puzzled. > > What has changed between then and now? I have permanently disabled > sndiod on my main install, instead starting it in my chroot. > > So i've stopped sndiod in the chroot, restarted sndiod on my main > install, then started audacious in the chroot: the white noise > issue is back. > > I run sndiod with no customised flags, sndiod_flags is really empty in > /etc/rc.conf (just checked, in case i would have forgotten something). > > And the problem only occurs with audacious: mpv, ffplay, mpg321 > and cmus work fine in the same conditions! > >> Since the output format in "automatic" always appears to be 32-bit >> signed native endian (after falling back from float), I'm surprised >> that your change actually changes any behavior. >> >> > + par.bits = fdata->bits; >> > +- par.bps = fdata->bytes; >> > +- par.sig = fdata->sign; >> > +- par.le = fdata->le; >> > ++ par.bps = SIO_BPS(par.bits); >> > ++ par.sig = 1; >> > ++ par.le = SIO_LE_NATIVE; >> >> Can you try audacious -VV with the patch below and tell us the >> messages from [setup_output] and [open_audio]? >> >> --- src/sndio/sndio.cc.orig Fri May 24 03:14:01 2019 >> +++ src/sndio/sndio.cc Fri May 24 04:27:30 2019 >> @@ -168,6 +168,7 @@ >> >> bool SndioPlugin::open_audio (int format, int rate, int channels, >> String & error) { >> + AUDDBG("format=%d\n", format); >> const FormatData * fdata = nullptr; >> >> for (const FormatData & f : format_table) >> @@ -181,6 +182,8 @@ >> error = String (str_printf (_("Sndio error: Unsupported >> audio format (%d)"), format)); return false; >> } >> + AUDDBG("bits=%d bytes=%d sign=%d le=%d\n", >> + fdata->bits, fdata->bytes, fdata->sign, fdata->le); >> >> String device = aud_get_str ("sndio", "device"); >> const char * device2 = device[0] ? (const char *) device : >> SIO_DEVANY; > > In any case the output is similar: > > INFO output.cc:175 [setup_output]: Setup output, format 0, 2 channels, 44100 > Hz. > DEBUG sndio.cc:171 [open_audio]: format=0 > INFO output.cc:199 [setup_output]: Falling back to format 12. > DEBUG sndio.cc:171 [open_audio]: format=12 > DEBUG sndio.cc:186 [open_audio]: bits=32 bytes=4 sign=1 le=0 > > I'm sending a diff with that bit removed at least.
ok jca@ > Charlène. > >> -- >> Christian "naddy" Weisgerber >> na...@mips.inka.de >> > > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/audio/audacious-plugins/Makefile,v > retrieving revision 1.78 > diff -u -p -u -p -r1.78 Makefile > --- Makefile 20 May 2019 22:15:00 -0000 1.78 > +++ Makefile 24 May 2019 14:52:21 -0000 > @@ -4,11 +4,11 @@ COMMENT = input and output plugins for > > V = 3.9 > DISTNAME = audacious-plugins-$V > -REVISION = 2 > +REVISION = 3 > > CATEGORIES = audio multimedia > > -HOMEPAGE = http://audacious-media-player.org/ > +HOMEPAGE = https://audacious-media-player.org/ > > # BSD / GPL > PERMIT_PACKAGE_CDROM = Yes > Index: patches/patch-src_neon_neon_cc > =================================================================== > RCS file: patches/patch-src_neon_neon_cc > diff -N patches/patch-src_neon_neon_cc > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-src_neon_neon_cc 24 May 2019 14:52:21 -0000 > @@ -0,0 +1,19 @@ > +$OpenBSD$ > + > +Fix for ports gcc as feof() is a macro > + > +neon.cc:968:16: error: expected unqualified-id before '(' token > +bool NeonFile::feof () > + > +Index: src/neon/neon.cc > +--- src/neon/neon.cc.orig > ++++ src/neon/neon.cc > +@@ -45,6 +45,8 @@ > + #define NEON_ICY_BUFSIZE (4096) > + #define NEON_RETRY_COUNT 6 > + > ++#undef feof > ++ > + enum FillBufferResult { > + FILL_BUFFER_SUCCESS, > + FILL_BUFFER_ERROR, > -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE