mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
tools: move midievent to separate file
This commit is contained in:
parent
1ce85ee2ae
commit
ddc5c17163
7 changed files with 571 additions and 546 deletions
28
src/tools/midievent.h
Normal file
28
src/tools/midievent.h
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue