mmitch / gbsplay

gameboy sound player
https://mmitch.github.io/gbsplay/
Other
98 stars 20 forks source link

small issues with midi plugout #20

Closed mmitch closed 5 years ago

mmitch commented 5 years ago

Checking out issue #19 I ran the midi plugout for the first time in a long time and found some small issues:

mmitch commented 5 years ago

D'oh: The number part of the filename is the subsong number, so we can't increment it for subsequent exports. The easiest way would be to add some documentation regarding filename creation and overwriting of existing files.

mmitch commented 5 years ago

task 1 fixed with e1872f6

mmitch commented 5 years ago

task 2 fixed with 729d1f8 (documentation only, no changes)

mmitch commented 5 years ago

@ranma I have tracked part 3 of this issue down to these two lines in gb_flush_buffer()

Two plugouts (iodumper and midi) don't implement the write callback because they don't need it. This enables the shoutcut highlighted above and gb_flush_buffer() returns eartly. Unfortunately, this also means that lminval, lmaxval, rminval and rmaxval don't get updated, which leads to the silence detection kicking in immediately in gbs_step()

In the midi output this also manifests as the global volume being empty in the status line during conversion, while the per-channel-volumes are displayed correctly.

What should we do?

  1. remove the shortcut in gb_flush_buffer (this increases computation time during conversion - but who cares?)
  2. add empty writer implementations to both plugins (but then the shortcut from 1. is never used and we can simply implement 1. straight away)
  3. disable the silence timeout when using those two plugins (with a new flag like we did for stdout/verbosity)
  4. add a note to the manpage that says you have to set -T or output will be cut off (I don't like this one)

What do you think?

mmitch commented 5 years ago

Thanks!