digital-sound-antiques / msxplay-js

A msx sound player for JavaScript
http://digital-sound-antiques.github.io/msxplay-js/
71 stars 4 forks source link

The song MARCH-1.OPX doesn't produce any sound #13

Closed sdsnatcher closed 5 years ago

sdsnatcher commented 5 years ago

The song MARCH-1.OPX supplied at #11 doesn't produce any sound, while on the real MSX the song plays normally.

Tested on Google Chrome 77.0.3865.120, on mac OS 10.14.6.

okaxaki commented 5 years ago

Since MARCH-1.OPX contains more than 3 seconds silence, it seems that libkss stop the song automatically. it's a default behavior of libkss but i should have disabled that option for msxplay.js.

sdsnatcher commented 5 years ago

One approach for this problem could be: From the start of the song, a bigger timer of 10000ms could be set, then reduced to 3000ms only after any sound is produced. What do you think? This should be simple to implement.

okaxaki commented 5 years ago

As only for use-case on MSXplay.js, I agreed. But at this moment, i just preferred to solve this problem by patch workaround (commit 8b3d1d3)

The silence detection feature is used from application like msxplug to auto-skip empty KSS song track. If such bigger timer is directly introduced, it may conflict with the auto-skip feature. To avoid this, one better way is to implement the timer as a default-off, brand-new feature to libkss. However, i also think MARCH-1.OPX's case is very rare. I'm thinking about whether it's worth to implement.