mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-15 08:56:38 -05:00
remove the rate_match io
Now that the stream provides us with a requested size, we don't need to use the rate_match anymore.
This commit is contained in:
parent
5192fcb16c
commit
7e42c905a8
8 changed files with 12 additions and 104 deletions
|
|
@ -90,7 +90,6 @@ typedef struct {
|
|||
struct spa_hook stream_listener;
|
||||
|
||||
struct pw_time time;
|
||||
struct spa_io_rate_match *rate_match;
|
||||
|
||||
struct spa_audio_info_raw format;
|
||||
} snd_pcm_pipewire_t;
|
||||
|
|
@ -374,19 +373,6 @@ static void on_stream_param_changed(void *data, uint32_t id, const struct spa_po
|
|||
pw_stream_update_params(pw->stream, params, n_params);
|
||||
}
|
||||
|
||||
static void on_stream_io_changed(void *data, uint32_t id, void *area, uint32_t size)
|
||||
{
|
||||
snd_pcm_pipewire_t *pw = data;
|
||||
switch (id) {
|
||||
case SPA_IO_RateMatch:
|
||||
if (pw->io.stream == SND_PCM_STREAM_PLAYBACK)
|
||||
pw->rate_match = area;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void on_stream_drained(void *data)
|
||||
{
|
||||
snd_pcm_pipewire_t *pw = data;
|
||||
|
|
@ -422,7 +408,7 @@ static void on_stream_process(void *data)
|
|||
if (b == NULL)
|
||||
return;
|
||||
|
||||
want = pw->rate_match ? pw->rate_match->size : hw_avail;
|
||||
want = b->requested ? b->requested : hw_avail;
|
||||
|
||||
xfer = snd_pcm_pipewire_process(pw, b, &hw_avail, want);
|
||||
|
||||
|
|
@ -451,7 +437,6 @@ static void on_stream_process(void *data)
|
|||
static const struct pw_stream_events stream_events = {
|
||||
PW_VERSION_STREAM_EVENTS,
|
||||
.param_changed = on_stream_param_changed,
|
||||
.io_changed = on_stream_io_changed,
|
||||
.process = on_stream_process,
|
||||
.drained = on_stream_drained,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue