lronaldo / cpctelera

Astonishingly fast Amstrad CPC game engine for C developers
http://lronaldo.github.io/cpctelera/
GNU Lesser General Public License v3.0
222 stars 53 forks source link

Playing Sfx without music makes no sound #166

Closed DjPoke closed 1 year ago

DjPoke commented 1 year ago

Hi,

I've tried to use cpct_akp_SFXInit() without using cpct_akp_musicInit() and without using cpct_akp_musicPlay(). Unfortunatly, i get no sound.

Also, if i play a music to play sfx instruments, and if the sfx instruments are not already used in the music, there is no sound, because the instruments seems to not be recognised.

lronaldo commented 1 year ago

Hi @DjPoke,

This is a consequence of Arkos Player not being intuitive. In order to use it properly, you need to carefully read the manual ( https://github.com/lronaldo/cpctelera/blob/master/cpctelera/src/audio/arkosplayer.txt ). For instance, Arkos Player does not indeed play any kind of SFX. Instead, it adds notes to a music that should be playing. As they are musical notes, they must use an instrument of the music being played. Therefore, if you only want SFX, you need to create a void music but with the instruments you like to use for SFX. Then you program a normal loop to reproduce music, even if there is no music, and then you can add notes to the music being played (that is, the SFXs).

As I say, everything is explained in the manual. Please, take the time to carefully read it first if you want to fully control the player.

DjPoke commented 1 year ago

Hi Francisco,

I’ve understoud, it works now.

Thanks a lot Regards Bruno