0
0

Hi, I have this question posted in the Delphi section, but since the cause of the problem probably isn’t even related to Delphi I’ll post it here as well. If the admins really mind then I’m sorry and will remove the post when I get back…


I’m having this difficulty with controlling the panning as well. I’m using Delphi 6 and it’s all working nice and all, got it all working in my soundengine for a game I’m developing, except for the panning part.

I’m playing stereo samples, which I want to have panned. Either turning of a channel or shifting one channel to the other side should do it (prefere the latter though).

Here’s my code.

begin
Stream := FSOUND_Stream_Open(PChar(‘D:\mp3.mp3’), FSOUND_NORMAL or FSOUND_LOOP_NORMAL, 0, 0);
ChanMp3 := FSOUND_Stream_Play(FSOUND_FREE, Stream);

FSOUND_SetPan(ChanMp3, FSOUND_STEREOPAN);
FSOUND_SetVolume(ChanMp3, 255);
end;

on a sliderchange event:
FSOUND_SetPan(ChanMp3, Slider.Position {is 0..255});

I’ve tried different settings, but nothing changes when the slider is slid. All I can sense (in any setting) is that the volume in the middle is increasingly slightly higher than not in the middle.

I’m not getting any panning effect the ways I’ve tried…

Can anybody help me on this??

  • Worm
  • You must to post comments
0
0

After a few days of teeth grinding I found out you have to pass the constant FSOUND_2D while opening a stream, which is not done in the testbed example.

Instead of calling
Stream := FSOUND_Stream_Open(PChar(‘D:\mp3.mp3’), FSOUND_NORMAL or FSOUND_LOOP_NORMAL, 0, 0);
I called
Stream := FSOUND_Stream_Open(PChar(‘D:\mp3.mp3’), FSOUND_2D or FSOUND_NORMAL or FSOUND_LOOP_NORMAL, 0, 0);

And it’s working quite nicely now…

  • Worm
  • You must to post comments
0
0

So this new dll, from which FMOD version is this? I downloaded FMOD (delphi headers) last week.

Any other files that may have been updated?

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.