Hey all!
I've been using the GLSMBass soundmanager, until I know discovered that it cannot be used in a commercial product.
So I tried to replace it with the GLSMWaveOut, but it creates errors:
32 (GLSound.pas, line 1833)
Any idea why I cannot replace Bass with WaveOut?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The error says: 5 (C:......\GLSound.pas, line 1842)
Here is line 1841 anc 1842:
mmres:=waveOutPrepareHeader(hwo, @wh, SizeOf(wavehdr));
Assert(mmres=MMSYSERR_NOERROR, IntToStr(mmres));
It happens when my program starts. I play sound like this:
if rpmTOTAL_var_real = 0 then
begin
GLSMBASS.Sources.Items[0].pause := true;
end
else
begin
GLSMBASS.Sources.Items[0].pause := false;
GLSMBASS.Sources.Items[0].Volume := 1 * (rpmTOTAL_var_real /250);
GLSMBASS.Sources.Items[0].Frequency := 5000 + round(rpmTOTAL_var_real * 100);
end;
It works with GLSMBass, but not GLSMWaveOut.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jerome!
Yes, then the error doesn't pop up. But the sound is not working anymore...
Any other ideas?
Is there a different requirement on the soundfile itself compared to the GLSMbass?
1 channel 16 bit .wav-file should work, as with the glsmbass?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey all!
I've been using the GLSMBass soundmanager, until I know discovered that it cannot be used in a commercial product.
So I tried to replace it with the GLSMWaveOut, but it creates errors:
32 (GLSound.pas, line 1833)
Any idea why I cannot replace Bass with WaveOut?
Thanks!
Hi Daniel I think the best it's use OpenAL. But have you a little sample for i can reproduce the error ?. What the exact error message ?
Around line 1833 i have this
It is here ?
Hi Jerome!
I'm very sorry, I forgot to write that I'm using GLScene 1.0.
The error is in this procedure:
Last edit: Daniel 2017-10-07
Hi Daniel it seem those lines
Assert(mmres=MMSYSERR_NOERROR, IntToStr(mmres));
I think they will be :
Assert(mmres<>MMSYSERR_NOERROR, IntToStr(mmres));
due to the MMSYSERR_NOERROR
Assert will not be raised when NOERROR
If it not work. What the displayed error message you have, exactly ?
The error says: 5 (C:......\GLSound.pas, line 1842)
Here is line 1841 anc 1842:
mmres:=waveOutPrepareHeader(hwo, @wh, SizeOf(wavehdr));
Assert(mmres=MMSYSERR_NOERROR, IntToStr(mmres));
It happens when my program starts. I play sound like this:
It works with GLSMBass, but not GLSMWaveOut.
Hi have you tried change Assert(mmres=MMSYSERR_NOERROR, IntToStr(mmres)); by
Assert(mmres<>MMSYSERR_NOERROR, IntToStr(mmres)); ?
Hi Jerome!
Yes, then the error doesn't pop up. But the sound is not working anymore...
Any other ideas?
Is there a different requirement on the soundfile itself compared to the GLSMbass?
1 channel 16 bit .wav-file should work, as with the glsmbass?
Is there any demo where the GLSMWaveOut is being used?
The GLSMBass has a non-commercial license right?
Hi Daniel,
Did you try a demo in
https://sourceforge.net/p/glscene/code/HEAD/tree/trunk/Samples/Delphi/Demos/sound/3Dsound%20WaveOut/ ?
Alas, but it also stops after 5 seconds sounding. There is wrong loop parameter somewhere.
Hi Pavel!
Yes, I have tried the demo, same result with the above error...
Very weird!
In GLScene 1.0 there doesn't seem to be an GLSMopenAL component.
Hi i checked GLSMOpenAL.pas is in folder SoundVideoApis. in the curretn SVN.
Just a question Daniel why do you not update to the current version 1.5 ?
Hi Jerome!
The problem is I have the old Delphi 6, from the stoneage (2001), and I cannot install any GLScene past 1.0...
Ok, i understand. Perhaps, do you plan to test Lazarus or CodeTyphon ?
Anyway i've checked in https://sourceforge.net/p/glscene/code/HEAD/tree/tags/GLScene%20v1.1/
You have a package for OpenAL."GLSS_OpenAL6.dpk" You can try it
Thanks Jerome!
I'll have a look!
Daniel,
I fixed GLSMWaveOut parameters in the last version of GLS 1.7 so the sample in demos is working fine now
PW