* add undo to instrument editor (check for diffs on the current DivInstrument in insEdit, record them in a stack)
* style fixes
* accidentally left some logs in
* typo in style fix
* cheat to avoid warning -Werror=class-memaccess on linux
* warn instead of assert on case where MemPatch application would exceed size of target buffer (which should never happen, if you're applying the patch to the same type it was generated from)
* instrument editor undo: don't check delta if no user input has come in that could potentially have dirtied the editor
* don't run a delta against cached instrument if not insEditOpen
* revert fixedQueue to before my 'fix' (if i touch it again i'll add unit tests)
* explicitly cast to (DivInstrumentPOD*) when memsetting DivInstrumentPOD in DivInstrument constructor, rather than relying on implicit memory layout
* use delete[] instead of free (whoops)
* MemPatch/DivInstrumentUndoStep -- remove clear() function (ambiguous whether it should free data, it only existed to set data to null after the swap, so just do that directly now). Also set data to null after delete.
* DivInstrument -- fix dangling undo-step pointers being created on duplicate (potentially leading to use-after-free), fix undo-step objects being shamelessly leaked
---------
Co-authored-by: Adam Lederer <adam@adamlederer.com>
* push test
* remove test file
* add GUI_ACTION_PAT_ABSORB_INSTRUMENT action (set current instrument to channel's current instrument column)
* rename 'absorb instrument' to 'adopt instrument' (clearer), adopt octave as well, replace editor octave min/max numbers in the code with defines
* CRAP
* rename 'adopt instrument' back to 'absorb instrument'
---------
Co-authored-by: Adam Lederer <adam@adamlederer.com>
Co-authored-by: tildearrow <me@tildearrow.org>
* push test
* remove test file
* add GUI_ACTION_PAT_ABSORB_INSTRUMENT action (set current instrument to channel's current instrument column)
---------
Co-authored-by: Adam Lederer <adam@adamlederer.com>
- MultiPCM also has level direct, so it's remained in DivInstrumentMultiPCM. everything else don't support at MultiPCM is moved into DivInstrumentOPL4PCM.
- MultiPCM can't modify ADSR envelope unless reading instrument from ROM, so I decided to remove ADSR envelope macros. these are moved into OPL4 PCM instrument.
- Save/Load of MultiPCM level direct parameter is still disabled until main version update (for disallow crash).
- Also, this PR fixes OPL4 VGM output.