X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 34E6D38323E1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1696029189;
	bh=URx1mmwH5GIkuuot3AP/k0AmtjTHvUxURdkK78WZlVU=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=C5Y+mHQLp7jD/iU1pQ8T7Fv2VL4MrXyx4j33g1eKh671YRbMs5/9EKXx98WpLGKN0
	 d9WwkJcnKKNsOpO8EKDX1GC6E+Xs13ckSjW10HQYKwI3M9KlYXlFO8i8ldvF2cWGhE
	 1WNgD5b7bFjdYzn4iL910ZgiMGkt8qDuHXXdKVGc=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DFC33858D32
X-Virus-Scanned: amavisd-new at boeck2.rrze.uni-erlangen.de (RRZE)
X-RRZE-Flag: Not-Spam
X-RRZE-Submit-IP: 2a02:810d:b640:863:e178:93b3:4a6c:a5d3
Message-ID: <ffc64677-e217-a224-2706-847dcfaba47a@fau.de>
Date: Sat, 30 Sep 2023 01:12:22 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
 Thunderbird/102.15.1
Subject: Re: portaudio: only OSS host API available since version 19.20210406-2
To: Takashi Yano <takashi.yano@nifty.ne.jp>, cygwin@cygwin.com
References: <067beee9-8d53-beec-1b7a-1b0a238cefdc@fau.de>
 <20230929190454.99185f44d8396ef326030ecf@nifty.ne.jp>
In-Reply-To: <20230929190454.99185f44d8396ef326030ecf@nifty.ne.jp>
X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, KAM_NUMSUBJECT,
 NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS,
 TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Michael Panzlaff via Cygwin <cygwin@cygwin.com>
Reply-To: Michael Panzlaff <michael.panzlaff@fau.de>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

Hi,

thank you for the quick reply. I checked my program again and there was 
indeed a bug which prevent OSS from working. Though, it's not really OSS 
what was the problem. The problem was the huge buffer size that OSS causes.

I set a suggested latency of 0.008 (which is what I obtain from 
defaultLowOutputLatency) and the audio callback get's a framesPerBuffer 
size of 6000! At 48 kHz that is more than 100 ms of latency. I'm not 
suggesting that MME is the best solution, but it was able to get 
something below 50 ms (not sure what defaultLowOutputLatency was with that).

Is there a difference when building portaudio for Cygwin instead of 
native Windows? Is there a specific reason why MME, DirectSound, WASAPI 
are not available? Do they cause maintenance overhead?

Am 29.09.2023 um 12:04 schrieb Takashi Yano:
> On Fri, 29 Sep 2023 02:12:51 +0200
> Michael Panzlaff rote:
>> Hi,
>>
>> I got the right mailing list by not writing to cygwin-apps.
>> Since my last cygwin update (which upgraded portaudio
>> to 19.20210406-2) the library does not function properly anymore an no
>> sound playback is possible.
>>
>> Usually you query portaudio for the various host APIs for and then open
>> a stream. In the past Cygwin's portaudio at least supported output via
>> MME. In the latest version 19.20210406-2 this doesn't work anymore. The
>> only available host API that is reported is OSS, but that doesn't really
>> exist on Windows I assume. My best guess is that the package isn't
>> configured correctly and isn't compiled with the correct support for all
>> the APIs.
>>
>> I'd be very welcome to get back support for MME. My application is
>> currently unsuable on Cygwin because the library doesn't work. If it's
>> just a matter of correctly configuring the package, I'd be interested in
>> also getting support for the other host APIs that portaudio usually
>> supports on native Windows, but that's entirely optional for me :)
>>
>> Now that I checked, even downgrading to an older version of portaudio
>> from the Cygwin installer doesn't fix the problem. So perhaps it's not
>> caused by portaudio but from something else in Cygwin. Does anybody have
>> any ideas?
>>
>> Best regards
>> Michael Panzlaff
>>
>> PS: Here is a sample C code which queries the host APIs and which should
>> list MME and definitely not OSS:
> 
> OSS is implemented in cygwin and it works. 19.20210406-2 switches it backend
> to OSS rather than win32apis.
> 
> Are there any reason to stick to MME backend?
> 


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
