Open Be-ing opened 3 years ago
So long as the buffer processor is configured to use framesPerBuffer as the user buffer size I don't think there is a problem here. The framesPerBuffer parameter controls the size of the buffer passed to the user callback, it does not have to be related to the native API buffer size (jack_set_buffer_size in this case). Presumably this is by design.
What I am trying to achieve here is full functionality with PipeWire using the JACK API rather than having to write a whole new host API. With jackd, the user sets a buffer size when configuring the server. PipeWire by contrast sets the buffer size dynamically to the lowest buffer sizes requested by any active application. That requires an application to set the buffer size though.
If I understand correctly, what you want is when using the JACK API with PipeWire (but not with JACK server) PortAudio should set the buffer size. Is that correct? Seems reasonable, so long as there is a way to detect that the server is in-fact a PipeWire server.
The old comment in the code about not supporting buffer size that are not powers-of-2 may be obsolete. The PortAudio buffer adaptation code should handle that.
so long as there is a way to detect that the server is in-fact a PipeWire server
Why is that needed?
Why is that needed?
Because we can't (and don't want to) set the buffer size for a native JACK server. Unless I misunderstand, what you're proposing is:
Pa_OpenStream has a
framesPerBuffer
parameter to set the buffer size:JACK has a function to set this: jack_set_buffer_size. However, the JACK host API currently ignores the
framesPerBuffer
parameter: