From nobody Sat Oct 29 22:05:57 2022 X-Original-To: freebsd-current@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 4N0D5F1Gmcz4h0M1 for ; Sat, 29 Oct 2022 22:06:09 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N0D5F0nLrz3gPT for ; Sat, 29 Oct 2022 22:06:09 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667081169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JCgeNew5opcOzFIeCAi1EZVmgfVqcoDx+D+N5qRUvZk=; b=Oz7T811W0mexPRZCEERNf/EPqWWyJOa9Md1lyokDKAedxmuPYDNvRf47v5sWFyCpWhjewp VQjmev2a+cwKnSiANSeNcAovD+Von9qv6KZzttPZZ4xezV/++CPPneIJd8rq8zH0L9k8vp vQ4ynTHFpQ5guRkqGa7yeC77PHOH6APl8y+puh4YtVQl8Yo+C3cyDrRUSFoBI28bUOgYfY y5DbsT11Mp8Lh3zDOHCyjIBbp6FZf52TBtcJGkAMASFd+cjFP18LdVqk61TP4EAmNbY9Bh SUa+evS2C1gnHDGrufCo544h9vgSZS95UzShDlHx9907j7GbFRTzWIXm5414pA== Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4N0D5D6mnrzqHy for ; Sat, 29 Oct 2022 22:06:08 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-ua1-f45.google.com with SMTP id t26so3466579uaj.9 for ; Sat, 29 Oct 2022 15:06:08 -0700 (PDT) X-Gm-Message-State: ACrzQf3Z/soazU0v83MJLt3A7XpUPvzESsOX4krSALRBzDrnVpg7byKT RbTVyGJ7mwC+yi6N7fYp8NVeHjTum6yhxlMEWkg= X-Google-Smtp-Source: AMsMyM4WjWZrK2hVUEUf1XbIINGVatLs8h9sJDhkDUB7RpB1vddqePU0BPtij4+jG+4lf5yfzfT8SMoccFWU6HXc0aA= X-Received: by 2002:ab0:601a:0:b0:3d2:a014:b043 with SMTP id j26-20020ab0601a000000b003d2a014b043mr1237274ual.13.1667081168496; Sat, 29 Oct 2022 15:06:08 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <106b05da-be44-ef6f-e2c8-0888ee71ed88@selasky.org> <10ff4875-c6bd-88a0-bf0d-7ae52106131e@selasky.org> In-Reply-To: From: Nuno Teixeira Date: Sat, 29 Oct 2022 23:05:57 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: morse(6) sound To: Hans Petter Selasky Cc: Diane Bruce , FreeBSD CURRENT Content-Type: multipart/alternative; boundary="000000000000dc2e4c05ec33947d" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667081169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JCgeNew5opcOzFIeCAi1EZVmgfVqcoDx+D+N5qRUvZk=; b=UiTAPi+FM+59q5V5s90+2nKzZbVQplZ6x87ogofZSM5XAtVWxhfM3zTxdm9T+kom7i1jiG 1RCCbNqwypu6rXYjXDVJxjqxS7SxKttcUd4MmcCQyzJBBGmmFaUofJR8aKnML3ZeORSHyF /cSnZp8v2lyV185huCN/7FK8YCqkV3FI+jKOczJhSzaSMo3TmAGNbt/pamq2dyTdTVnSSD DlTd+qzlx2AcAJM9eoSExkDehpG55ZOHKqfdg+im2F/JG45deEoHiZMgKOeoDOcQg9DgSN gK5tTuMN/zRU3HEXqeoLXRGGVt65exAkph3yel5lPCUOToq3r7Cn5IQfyG95dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667081169; a=rsa-sha256; cv=none; b=i9EAqKvKNh7h7qXvh7URej9Pq2wIPh1/ZA4/jCkr+KCLHTemGNiRUx1mGKXpnVjsS9DngE zyRHEiQgWIfuY1wSas2tla5AmV9/hbkrl+NkKEg4Dhw/kZeYGu4Glt93lKlfEPLcqEnWQU VFdpLhN6/FVLoooWItiEM8KrT5MPsYZvIVzALoP6ZrGJ+AqM1iFDRMURtbbE/EhVKMLboR RikxddAvfGyLI3n7b+lhDArGMeje1cHkPCk3CCjmv/bPDOsyRgiZRoRM0w+V3XZJNgpcwq wUpSrCrNZ2UNyTWexG4kq3lDOR8Rbamd18f25xVTAQzgUefCy7lLFaVYceGM+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --000000000000dc2e4c05ec33947d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Considering that morse could use same beep dsp code, instead of repeating dsp code inside morse, why not use a dsp library or something so that morse could use it without duplicating code? Hans Petter Selasky escreveu no dia s=C3=A1bado, 29/10/20= 22 =C3=A0(s) 19:22: > On 10/29/22 20:18, Nuno Teixeira wrote: > >> Technically you could symlink the two - yes. > > > > Can't understand how, what do I missing? > > > > In the main() routine, the name of the program name is passed. > > Then you just check if argv[0] =3D=3D "morse" and invoke main_morse() > instead, if you see. Of course you need to write main_morse() first, but > you can re-use all the dsp code in there. > > --HPS > > > --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000dc2e4c05ec33947d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Considering that morse could use same beep dsp code, = instead of
repeating dsp code inside morse, why not use a dsp lib= rary or
something so that morse could use it without duplicating = code?

Hans Petter Selasky <hps@s= elasky.org> escreveu no dia s=C3=A1bado, 29/10/2022 =C3=A0(s) 19:22:=
On 10/29/22 20:= 18, Nuno Teixeira wrote:
>> Technically you could symlink the two - yes.
>
> Can't understand how, what do I missing?
>

In the main() routine, the name of the program name is passed.

Then you just check if argv[0] =3D=3D "morse" and invoke main_mor= se()
instead, if you see. Of course you need to write main_morse() first, but you can re-use all the dsp code in there.

--HPS




--
Nun= o Teixeira
FreeBSD Committer (ports)
--000000000000dc2e4c05ec33947d--