ahx2play icon indicating copy to clipboard operation
ahx2play copied to clipboard

Subsequent batch WAV renders result in lengths of 5-7 seconds if preceded by infinite loop module

Open bryc opened this issue 2 years ago • 2 comments

I tried to use ahx2play in a batch script in Windows 10, and a handful of songs required me to press a key to end the recording.

Which isn't a big deal, but the problem was, the immediate next call of ahx2play.exe would end prematurely and only 5-7 seconds of audio gets captured, resulting in truncated captures.

Which is weird, as you'd think each iteration would not be influenced by each other.

I compiled under Windows using MinGW, my portable compiler of choice, using this (not sure if there's a better way, but it worked for me):

 gcc ./audiodrivers/winmm/winmm.c loader.c paula.c replayer.c .\ahx2play\src\posix.c .\ahx2play\src\ahx2play.c C:\Windows\System32\winmm.dll

In particular, I'm using this simple .bat oneliner (with wav forced on in ahx2play.c, was having issues with the cmd options):

FOR %%F in (*.ahx) do ahx2play "%%F"

On a slightly related note, some songs that technically 'need' an infinite loop, cannot be captured currently (I believe?)

For example: https://modland.com/pub/modules/AHX/Yelm/oldskoolcrackintrosong.ahx

This song (again) has a final note that is ignored by ahx2play, likely because of a F00 (speed 0) command terminating it, but is very much part of the song.

I feel like an option for forcing an infinite loop that would capture this would be useful, along with a 12-16 minute cap that ends it without filling the disk with GBs of repetitive data.

Another one that does the F00 ending trick, that ahx2play cuts off:

https://modland.com/pub/modules/AHX/Jazzcat/enchanted%20friday%20nights.ahx

bryc avatar May 24 '23 16:05 bryc

I have no idea why the first problem happens, so I can't debug it.

I'll have to experiment more with the F00 case another day, I'm currently sick and not really having the mental energy to dig into this player right now.

8bitbubsy avatar May 25 '23 19:05 8bitbubsy

I still don't know what causes this, and I don't know where to begin in finding the fault...

8bitbubsy avatar Jun 25 '23 18:06 8bitbubsy