ipatix/agbplay

Bad sounding instrument in Sonic Advance

Opened this issue · 9 comments

In the Neo Green Hill Zone Act 2 theme in Sonic Advance (track 0013 in soundlist), it seems that channel 4 has a problem. The instrument doesn't sound like it should. I don't know at the moment if this problem is present in other tracks.

The attached archive contains the first 10 seconds of the emulated version (correct) and of agbplay (the one with a problem) of the music involved.
NGZ2.zip

ipatix commented

Can you please check again with the latest version if this problem is fixed? There have been a lot of changes recently in regards the Game Boy PSGs.

ipatix commented

Also please make sure that you have set the correct pcm-samplerate in the json. If the instrument in question is using the fixed frequency mode, this may be because the wrong samplerate is used and the instrument plays back at wrong pitch.

First of all, thank you for taking the time to look at this issue after all this time. 👍

So, I got a compilation error (from Cygwin) with the latest version :

src/PlayerInterface.cpp: In member function 'void PlayerInterface::portaudioOpen()':
src/PlayerInterface.cpp:360:17: error: too many initializers for 'PaWasapiStreamInfo'
  360 | }
      | ^
make: *** [Makefile:48: obj/PlayerInterface.o] Error 1

Also, when playing this track, I used the game's default configuration in the json. I haven't yet checked whether the said parameter is correct.

ipatix commented

Perhaps this is a version incompatibility. Try again, I've changed the initializer to zero init the fields which may not be available.

Hmm, now it builds, it loads the ROM, but it crashes and output "Unable to initialize sound output: Host API could not be initialized". My old build is still functionnal. I also have updated all dependencies, and I still have this error after building.

ipatix commented

Please try once again :)

Huh, now it builds, loads ROM and doesn't crash on its own, but displays "No supported API found, falling back to: OSS" in the agbplay dialog box (playing a track crashes agbplay). The curious thing is that it now also does this with my old agbplay build, so I think it's now a problem on my end, but I don't know what's causing it.

ipatix commented

See #63 . I assume agbplay doesn't crash but locks up instead.

Well, there is indeed a certain latency. Unfortunately, however, the issue with Neo Green Hill Zone Act 2 still doesn't seem to have been solved. I guess I'll have to test with a different pcm-samplerate value?