Im looking for help on a couple of problems I've experienced with the GLXTreem SoundEngine.
The first problem is that I cannot turn the sound off. If I use
The Stop doesn;t turn the music off but just makes it softer, doing the Play then returns it to its normal volume.
FMusicState := Value;
If Not FMusicState then
I initialize the Music Engine and the relevant sound by:
The FMod.dll I'm using is the one that came in the GLXTreem download file.
Sound := MusicEngine.Sounds.Add;
Sound.SoundType := st2D;
The second problem is that I cannot have two GLXSoundEngine components on the form at the same time. I dont get any errors but when I close the program (running in the IDE) I get an exception. I know its the second SoundEngine because if I remove it I no longer get the error. I want two sound engines to allow me to have music from the one and sound effects from the other, allowing me to switch off the sound effects when I want to play another at the same time allowing multiple music scripts to be playing.
The code below if for the sound effects. It turns off all sounds currently playing (or makes them softer - see above):
procedure TMainForm.PlaySound(Name: String; Only: Boolean);
I : Integer;
// Add turn off other sounds if Only is true
If Only then
For I := 0 to SoundEngine.Sounds.Count - 1 do
If SoundState then