Hello everybody!
I made the remake my first Lazarus game: this is the "Space Defender v.2.0". It is a small space shooter game and you can download it from my website:
https://itsmprog.000webhostapp.com/lazjatekok/spacedef.zipEverything is OK with it, except the sound.
Because I use the normal Windows API to making sounds. The two main problems with it that:
1. only one sound can be heard at a time,
2. I can't change the sound volume.
I use this code to play sound:
uses MMSystem;
(...)
sndPlaySound('sounds\a_sound.wav',snd_Async or snd_NoDefault);
and this code for set the sound volume:
var sndvolume: byte;
(...)
sndvolume:=25;
waveOutSetVolume(0,sndvolume);
But I can hear nothing with
waveOutSetVolume(), therefore I must set to comment this line. In fact, the game doesn't give sound since I used this command - maybe I maked worse something?
So, my question is that these problems can be solved with the simple Windows API or I have to search a better solution, e.g. a particular modul, such as FMOD or similar?