0
0

Hi, I have a Open Gl project and I want managed a sample sound.
Now, In my "son.pas" I have a "procedure fire ();"

[code:2dnwz6s1]procedure fire ();
var
tir : PFSoundSample;
begin
tir := FSOUND_Sample_Load(FSOUND_FREE, ‘357magnum.wav’, 0, 0, 0);
FSOUND_PlaySound(FSOUND_FREE, tir);
[/code:2dnwz6s1]

And I call this procedure (out of the loop) in the "main.pas" where I initialize fmod with [code:2dnwz6s1]FSOUND_Init(44100, 32, 0);[/code:2dnwz6s1]

And in the loop, I have created an interaction with the keyboard . That is to say I call the procedure fire when I press ENTER

[code:2dnwz6s1] if glfwgetkey(GLFW_KEY_ENTER)=1 then
fire;[/code:2dnwz6s1]

I don’t know why I don’t have any sound when I press the key…

Thanks for your response and excuse me for my poor English.

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.