mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
jack: fix buffer_size
Make sure we never return -1 and properly scale the size of the buffer.
This commit is contained in:
parent
47b7d73b2a
commit
b1d2b9fb39
1 changed files with 1 additions and 2 deletions
|
|
@ -3154,9 +3154,8 @@ int jack_port_type_size(void)
|
|||
SPA_EXPORT
|
||||
size_t jack_port_type_get_buffer_size (jack_client_t *client, const char *port_type)
|
||||
{
|
||||
struct client *c = (struct client *) client;
|
||||
if (!strcmp(JACK_DEFAULT_AUDIO_TYPE, port_type))
|
||||
return c->buffer_size;
|
||||
return jack_get_buffer_size(client) * sizeof(float);
|
||||
else if (!strcmp(JACK_DEFAULT_MIDI_TYPE, port_type))
|
||||
return BUFFER_SIZE_MAX;
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue