From nobody Tue Mar 15 12:37:22 2022 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1B3BD1A1EC75 for ; Tue, 15 Mar 2022 12:37:31 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "amnesiac", Issuer "amnesiac" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KHtGL28G4z3R6R; Tue, 15 Mar 2022 12:37:30 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.16.1/8.16.1) with ESMTPS id 22FCbM0P058598 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 15 Mar 2022 13:37:22 +0100 (CET) (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.16.1/8.16.1/Submit) id 22FCbMKx058597; Tue, 15 Mar 2022 13:37:22 +0100 (CET) (envelope-from fuz) Date: Tue, 15 Mar 2022 13:37:22 +0100 From: Robert Clausecker To: Emanuel Haupt Cc: ports@freebsd.org Subject: Re: SDL audio issue with hivelytracker (porting attempt) Message-ID: References: <20220315124908.205a07fc8dec2d0c5d6c6e92@FreeBSD.org> List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220315124908.205a07fc8dec2d0c5d6c6e92@FreeBSD.org> X-Rspamd-Queue-Id: 4KHtGL28G4z3R6R X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of fuz@fuz.su designates 2001:41d0:8:e508::1 as permitted sender) smtp.mailfrom=fuz@fuz.su X-Spamd-Result: default: False [-3.29 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.991]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[fuz.su]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[ports]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi Emanuel, This is a common issue I had with multiple ports (the latest being emulators/fceux). The fragment size must be patched to be a power of 2 and the buffer for the fragments must be resized to be at least as large as the fragment size (iirc). This might be the reason why you get a signal. The fragment size is set in the SDL_AudioSpec structure member samples passed to SDL_OpenAudio(). Try to find this call and patch it. Yours, Robert Clausecker Am Tue, Mar 15, 2022 at 12:49:08PM +0100 schrieb Emanuel Haupt: > I've been trying to port the hivelytracker to FreeBSD. After a lot of > patching I was finally able to start it with: > > SDL_AUDIODRIVER=disk > > with dsp (default) I would always get: > > Fragment size must be a power of two > > when > > SDL_OpenAudio(...) > > was called. > > I did some further digging and found some useful references in: > > https://cgit.freebsd.org/ports/tree/audio/faudio/files/patch-src_FAudio__platform__sdl2.c > > With this patch I was able to get the player to launch without the above > error: > > https://github.com/ehaupt/ports-wip/blob/master/ports/audio/hivelytracker/files/patch-replay.c > > The player now starts: > > I can click on 'Load Mod', load a sample mod but as soon as I get 'Play > Song' I get: > > Abort trap (core dumped) > > I've been trying to get some sense by running it with truss but haven't > been very successful so far. > > The work in progress port can be found here: > https://github.com/ehaupt/ports-wip/tree/master/ports/audio/hivelytracker > > The port still needs some TLC (hardcoded paths, etc...). I'll fix that > before adding the port. > > Could someone with SDL audio experience please have a look? I'd > appreciate the help. > > Emanuel > > > [1] https://github.com/pete-gordon/hivelytracker > -- () ascii ribbon campaign - for an 8-bit clean world /\ - against html email - against proprietary attachments