mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-07 04:34:07 -05:00
tools: add midi clip support
The SMF2 CLIP format is the official container for storing MIDI 2.0 messages. Add support in mididump and pw-cat.
This commit is contained in:
parent
b192099353
commit
eda3290883
5 changed files with 540 additions and 7 deletions
27
src/tools/midiclip.h
Normal file
27
src/tools/midiclip.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* PipeWire */
|
||||
/* SPDX-FileCopyrightText: Copyright © 2025 Wim Taymans */
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <spa/utils/defs.h>
|
||||
|
||||
#include "midievent.h"
|
||||
|
||||
struct midi_clip;
|
||||
|
||||
struct midi_clip_info {
|
||||
uint16_t format;
|
||||
uint16_t division;
|
||||
};
|
||||
|
||||
struct midi_clip *
|
||||
midi_clip_open(const char *filename, const char *mode, struct midi_clip_info *info);
|
||||
|
||||
int midi_clip_close(struct midi_clip *mc);
|
||||
|
||||
int midi_clip_next_time(struct midi_clip *mc, double *sec);
|
||||
|
||||
int midi_clip_read_event(struct midi_clip *mc, struct midi_event *event);
|
||||
|
||||
int midi_clip_write_event(struct midi_clip *mc, const struct midi_event *event);
|
||||
Loading…
Add table
Add a link
Reference in a new issue