0
0

Ive got this problem
I want to change 2 music with the same volume
here is my code

// in deplhi
–some declarations here

musicvolume:=200;
music1= FSOUND_Stream_Open(“music1.ogg”,0, 0, 0);
music2= FSOUND_Stream_Open(“music2.ogg”,0, 0, 0);
chmusic:=FSOUND_Stream_Play (FSOUND_FREE,music1);
chmusic.SetVolumeAbsolute(chmusic,musicvolume);
FSOUND_StopSound(chmusic);
chmusic:=FSOUND_Stream_Play (FSOUND_FREE,music2);
chmusic.SetVolumeAbsolute(chmusic,musicvolume);
// OK until here
–some other sounds are played here, not streams
FSOUND_StopSound(FSOUND_ALL);
//FSOUND_ALL is use to make all silent
chmusic:=FSOUND_Stream_Play (FSOUND_FREE,music1);
chmusic.SetVolumeAbsolute(chmusic,musicvolume);

here the volume 200 isnt set for channel(chmusic) on which is playing music1, but it sets volume for ”unknown” channel on which is playing music2

PLEASE HELP!!
I dont know why it isnt working correctly

  • You must to post comments
0
0

channels are not objects, why are you calling
[code:163q2exl]
chmusic.SetVolumeAbsolute(chmusic,musicvolume);
[/code:163q2exl]
it should just be
[code:163q2exl]
FSOUND_SetVolumeAbsolute(chmusic,musicvolume);
[/code:163q2exl]

  • You must to post comments
0
0

Your right, but still not works

  • You must to post comments
0
0

[code:2n55yunm]music1= FSOUND_Stream_Open("music1.ogg",0, 0, 0);
music2= FSOUND_Stream_Open("music2.ogg",0, 0, 0); [/code:2n55yunm]
should be
[code:2n55yunm]music1:= FSOUND_Stream_Open("music1.ogg",0, 0, 0);
music2:= FSOUND_Stream_Open("music2.ogg",0, 0, 0);
[/code:2n55yunm]

  • You must to post comments
0
0

In values of volume it works, the volume is correcty set but i dont hear change of the volume

PS what is the difference between HW2D and 2D mode

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.