Re: Issues with more than four channels

From: Daniel Gibson <metalcaedes_at_gmail.com>
Date: Sat, 13 Jun 2020 19:50:22 +0200
On 13.06.20 07:36, Alexandre Ratchov wrote:
>>
>> It seems like irate and orate, iperiods and operiods etc always have to be
>> the same (on the same device) - is this guaranteed to work, or could it
>> happen that some soundcard demands different values for input and output?
>>
>> I mean it works for my device so I'm happy, I'm just wondering :)
> 
> Any full-device supports common rates and period size, otherwise
> full-duplex audio wouldn't work. The most general audio program
> pattern is the below pseudo-code:
> 
> 	prime(data, buffer_size);
> 	write_samples(data, buffer_size);
> 	while (1) {
> 		read_samples(data, period_size);
> 		process(data, period_size)
> 		write_samples(data, period_size);
> 	}
> 
> any program does a subset of this pattern (players don't have the
> recording part). Implementations may use a poll()-based event loop or
> a callback-based API, but they are all equivalent. If playback and
> recording rates or periods were not the same, above pattern wouldn't
> work; device would be usable only as two independent play-only and
> record-only devices.
> 

Good to know, thanks!
Received on Sat Jun 13 2020 - 19:50:22 CEST

This archive was generated by hypermail 2.3.0 : Sun Jun 14 2020 - 01:33:14 CEST