kniEngine / kni

KNI is a cross-platform C# game framework.
Other
124 stars 9 forks source link

SoundEffect pitch not working on BlazorGL #1727

Open jordi-z80 opened 1 month ago

jordi-z80 commented 1 month ago

KNI 3.12.9001 , Window10 , BlazorGL

Just that, SoundEffect pitch doesn't seem to be working on BlazorGL. I wrote a simple example :

https://github.com/jordi-z80/SoundTest2/

if (justPressed (Keys.Q)) effect.Play (1.0f, -0.6f, 0); if (justPressed (Keys.W)) effect.Play (1.0f, -0.4f, 0); if (justPressed (Keys.E)) effect.Play (1.0f, -0.2f, 0); if (justPressed (Keys.R)) effect.Play (); if (justPressed (Keys.T)) effect.Play (1.0f, 0.2f, 0); if (justPressed (Keys.Y)) effect.Play (1.0f, 0.4f, 0); if (justPressed (Keys.U)) effect.Play (1.0f, 0.6f, 0);

Pressing keys Q...U produces different sounds on KNI Windows, but not on web.

nkast commented 1 month ago

As I remember, when I tried to connect the StereoPannerNode, nothing worked. GainNode on the other hand which controls the volume, worked as expected. I haven't worked on it since then.

https://github.com/kniEngine/kni/blob/8cbec78794afb21bfafbf4c53320263574388668/MonoGame.Framework/Audio/Blazor/ConcreteSoundEffectInstance.cs#L45C15-L45C32

jordi-z80 commented 1 month ago

Hi nkast, thanks for the answer.

As you marked it as bug, I'll leave it open for the moment.