Commit graph

5 commits

Author SHA1 Message Date
Wim Taymans
8b874a9514 pw-cat: handle midi EOF better
Return 0 when there are no more events, 1 when we have an event and
< 0 for errors. Use this to correctly push the last set of events on
EOS and then return 0 and stop without an error.
2020-02-21 11:19:35 +01:00
Wim Taymans
cc1ed84f9f midi: simplify some things 2020-02-19 10:48:16 +01:00
Wim Taymans
ddcb08a98a pw-cat: read midi file from memory
mmap the midi file and read from memory. Simplifies some things and
allows us to potentially parse from the RT thread later.
2020-02-19 09:58:47 +01:00
Wim Taymans
b6a6d1f0bb pw-cat: fix tempo changes
Use time in seconds as event timestamp.
Apply tempo from the new events, keep track of elapsed time and
time since tempo change to get the right time.
Skip metadata midi in pw-cat.
2020-02-18 16:13:35 +01:00
Wim Taymans
fe616e38d8 pw-cat: add midi support 2020-02-18 13:38:26 +01:00