tools: move midievent to separate file

This commit is contained in:
Wim Taymans 2025-08-28 15:45:06 +02:00
parent 1ce85ee2ae
commit ddc5c17163
7 changed files with 571 additions and 546 deletions

28
src/tools/midievent.h Normal file
View file

@ -0,0 +1,28 @@
/* PipeWire */
/* SPDX-FileCopyrightText: Copyright © 2020 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#include <stdio.h>
#include <spa/utils/defs.h>
struct midi_event {
#define MIDI_EVENT_TYPE_MIDI1 0
#define MIDI_EVENT_TYPE_UMP 1
uint32_t type;
uint32_t track;
double sec;
uint8_t *data;
uint32_t size;
struct {
uint32_t offset;
uint32_t size;
union {
struct {
uint32_t uspqn; /* microseconds per quarter note */
} tempo;
} parsed;
} meta;
};
int midi_event_dump(FILE *out, const struct midi_event *event);