1

Hi,

i try to play simultanymous many sample (shoot and explode sound at the same time)
when i shoot the sound played but when i hit the target only sound explmode played ?

i generate my sound.h with NGX SoundBuilder.

thks for your response
avatar

2

I think you need to verify you are working with Adpcm-A samples. You likely also want verify that the samples are not flagged as background music or a background music loop.

My knowledge is limited but from what I understand there should be a que that sets the next sample up automatically when you call the sample to play. It should be possible to play two or more sounds at the same time.

If the samples are in the right format and you still can't hear both. Try separating the calls for the sounds so they don't happen on the same cycle. Maybe one call is some how canceling the other?

I'm sorry my knowledge is limited on this. It would cool to hear the method you use to get your samples to play simultaneously.

3

Hello,
as Mega Shocked said - make sure that the samples are displayed in ADPCM-A format in the SOUNDBUILDER (column 'TYPE') - only this type of samples can be played in parallel. For this, convert the samples to a sampling rate of 18500Hz before importing. also make sure that the individual samples are not marked as background music (column BGM/BGM LOOP).
the sound commands must not be sent directly one after the other - the Z80 needs some time to process and sort them... otherwise something might get lost.

ADPCM-A: 18500Hz, mono, up to 5 samples simultaneously, when playing a sixth sample the first sample is interrupted.
ADPCM-A/BGM: 18500Hz, mono, only one sample, without interruption and optional loop.
ADPCM-B: 1850-55555Hz, mono, only one sample, without interruption and optional loop.