adplug / adplay-unix

AdPlug's UNIX console-based frontend
GNU General Public License v2.0
12 stars 15 forks source link

Add "-e rawout" to "play" a file to an OPL2/3 .RAW file #9

Open arodland opened 6 years ago

arodland commented 6 years ago

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.

mywave82 commented 7 months ago

I am going to rebase this onto current master, and fix the indentation problems