I'm not really a C++ dev, and I'm sure that this could really use some refactoring, but it works.
The idea is to allow someone to do adplay -e rawout -d song.raw song.rad to convert a song in some module format to the RDOS RAW format using adplug's "disk OPL" class. gamemus can then convert the RAW to formats like DRO, IMF, or VGM. -e rawout implies -O null -o since those are the options you probably want for conversion.
As part of the change, the null output driver now parses the input (calls p->update()) instead of ignoring the input and going to a non-playing state immediately.
The stuff I did with dynamic_cast is probably a bad idea, but I didn't see a better way without changing the interface of Copl, which I didn't want to take on.
I'm not really a C++ dev, and I'm sure that this could really use some refactoring, but it works.
The idea is to allow someone to do
adplay -e rawout -d song.raw song.rad
to convert a song in some module format to the RDOS RAW format using adplug's "disk OPL" class. gamemus can then convert the RAW to formats like DRO, IMF, or VGM.-e rawout
implies-O null -o
since those are the options you probably want for conversion.As part of the change, the null output driver now parses the input (calls
p->update()
) instead of ignoring the input and going to a non-playing state immediately.The stuff I did with
dynamic_cast
is probably a bad idea, but I didn't see a better way without changing the interface ofCopl
, which I didn't want to take on.