mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pw-cat: write midi bytes directly.
This commit is contained in:
parent
6700e332f9
commit
54eef8bb9d
1 changed files with 1 additions and 3 deletions
|
|
@ -970,7 +970,6 @@ static int midi_play(struct data *d, void *src, unsigned int n_frames)
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
uint32_t frame;
|
uint32_t frame;
|
||||||
uint8_t *buf;
|
|
||||||
struct midi_event ev;
|
struct midi_event ev;
|
||||||
|
|
||||||
res = midi_file_next_time(d->midi.file, &ev.sec);
|
res = midi_file_next_time(d->midi.file, &ev.sec);
|
||||||
|
|
@ -997,8 +996,7 @@ static int midi_play(struct data *d, void *src, unsigned int n_frames)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
spa_pod_builder_control(&b, frame, SPA_CONTROL_Midi);
|
spa_pod_builder_control(&b, frame, SPA_CONTROL_Midi);
|
||||||
if ((buf = spa_pod_builder_reserve_bytes(&b, ev.size)) != NULL)
|
spa_pod_builder_bytes(&b, ev.data, ev.size);
|
||||||
memcpy(buf, ev.data, ev.size);
|
|
||||||
have_data = true;
|
have_data = true;
|
||||||
}
|
}
|
||||||
spa_pod_builder_pop(&b, &f);
|
spa_pod_builder_pop(&b, &f);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue