Skip to content

Conversation

@AranVink
Copy link
Contributor

This PR aims to add a basic batch player test to the CI for Adplay for DOS. It's based on my previous work done for Adplug DOS compatibility

It checks if the executeable actually runs, and no errors are returned. It does not validate the audio output in any way, just that adplay was able to run, play a file in batch mode, and not return any error codes.

Sidenote regarding audio output validation:
I'd really like to be able to crosscheck Adplay for DOS playback with the Adplay for Linux version, to see if there is any regression or other weird issue in the DOS version.
I've ran into issues trying to automate this, since capturing audio from emulated DOS environments can be done, but the emulation causes slight variations in the captured waveforms due to timing differences introduced with the emulation. For example comparing wave/DRO output recordings from multiple DOSBoxX runs show different results each run. I've tried writing a tool to compensate, but have yet to integrate it further. Also doing this takes quite a long time, since all test files will have to be played through a emulator in full, at actual speed.

@Malvineous
Copy link
Member

If you capture waveforms or DRO then you'll be introducing timing differences as you've found, not to mention tweaks in the emulator's OPL code could break the tests by producing a different waveform.

It might be better to use the AdPlug disk writer code to have AdPlug write the OPL data and timing information itself. This should not vary between runs and should be consistent between different platforms. It might also allow you to use something like qemu to run the DOS code under other platforms, so you can integrate the tests into a cross-compilation process rather than running them manually. After all, you're not testing the emulator's OPL code, you're testing whether AdPlay sends the right data to the OPL chip at the right time.

The tests for the AdPlug library itself already do this, so the songs don't have to play back in real time either.

Just make sure you're not overlapping test functionality with AdPlug itself - we already have tests to make sure files play back correctly (which I presume you could compile for DOS if you wanted), so there's no need to check for that in any AdPlay tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants