From nobody Sun May 16 22:56:36 2021 X-Original-To: freebsd-multimedia@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 BF934854916 for ; Sun, 16 May 2021 22:57:32 +0000 (UTC) (envelope-from evgeniy@khramtsov.org) Received: from mxa.khramtsov.org (mxa.khramtsov.org [IPv6:2a0a:e5c0:2:10f::f]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FjyMc4QpHz4gsP for ; Sun, 16 May 2021 22:57:32 +0000 (UTC) (envelope-from evgeniy@khramtsov.org) Received: from mxa.khramtsov.org (mxa.khramtsov.org [IPv6:2a0a:e5c0:2:10f::f]) by mxa.khramtsov.org (Postfix) with ESMTP id BC36B126275; Sun, 16 May 2021 22:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khramtsov.org; s=rsa; t=1621205747; 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=0kRh4IUIDFdAvMrktH6whyYsKLuXCQPx9kNdgV8GKVw=; b=AGEZRlUxVDSsDFSlDY+1VWNWyJc17r4SZa9cbzePFmqAOr+tTgnQfzLeCdd0oxWZsBo2pF Gi4nwkIwvDstVtugWrbdMw41w+jE7EXqgUPZ5fj5kN63DwcKwm5Z1CalmQQ+oALZ9JYYWy hFe2bcIiseibDNkLQwGf5XgYUAIT+t49eNw81XGe0zMjsm6dg9KOozBYOY80W0cdEit+K5 9qlzBxe6Qc/GVl3JZQQX+nGoQ8Tn1mIOI7trxSB+pT6vWk9+Y+1WbPD9lrzRZQS/Rw2dgR LffOmj141BUB+IXTnlNWJ3wK27USWeyxZ+PR/tRFDflcchYbtwtdZAARNDcDIw== Date: Mon, 17 May 2021 01:56:36 +0300 To: John-Mark Gurney Cc: freebsd-multimedia@freebsd.org Subject: Re: Silent noise while running simple OSS program and moving mouse? Message-ID: References: <20210516223649.GD14975@funkthat.com> List-Id: Multimedia discussions List-Archive: http://lists.freebsd.org/multimedia List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-multimedia@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210516223649.GD14975@funkthat.com> X-Rspamd-Queue-Id: 4FjyMc4QpHz4gsP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Reply-To: evgeniy@khramtsov.org From: Evgeniy Khramtsov via freebsd-multimedia X-Original-From: Evgeniy Khramtsov > Is it gaps in the sound? According to OSS documentation at opensound.com, read and write are blocking until there should be enough data for a buffer. If I don't touch mouse, e.g. typing only or doing some CPU stress stuff, there is no noise. But once I move mouse around, there is some silent noise. > Maybe post a recording of it. Writing to a fd doesn't produce a formatted .wav file, unfortunately. I'll report later once I figure out this and how to output as .wav. On Sun, May 16, 2021 at 03:36:49PM -0700, John-Mark Gurney wrote: > Evgeniy Khramtsov via freebsd-multimedia wrote this message on Mon, May 17, 2021 at 01:01 +0300: > > I wrote this simple OSS program that outputs sound from microphone back > > to the speakers (the close() and stuff is omitted): > > https://pastebin.com/raw/yX4gm5fL > > > > It works, though for some reason I get some silent noise while moving > > mouse around. Any ideas what could be wrong? Thanks. > > Can you define silent noise better? Maybe post a recording of it. > > Is it gaps in the sound? where there's a gap in either playback > or recording and it's absolutely silent, or do you mean that there's > an additional sound that only appears when you move the mouse? > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." >