You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, September 20th 2020, 11:36am

"mutesound()" is invalid

Hi, klaus.


*question* I tried "mutesound" in the following code snippet, but the message returned was always "false", is BUG?

Source code

1
2
3
4
ifnot(!plugin[soundinterface].tour_bg_sound_disable AND tour_soundson,
  mutesound(tour_bg_sound,true);
);
trace('tour_bg_sound Muted? ',get(sound[tour_bg_sound].muted));


Regards to you.

2

Sunday, September 20th 2020, 1:38pm

maybe your condition is wrong?
ifnot(! is a double negate

3

Sunday, September 20th 2020, 8:12pm

Hi,

I can confirm - yes, there is a bug in the mutesound() action (internally a simple typo).
That will be fixed in the next release.

As alternative you could use:

Source code

1
set(sound[tour_bg_sound].muted, true);

That's exactly the same that mutesound(tour_bg_sound) would do.

Best regards,
Klaus

4

Monday, September 21st 2020, 4:59am

maybe your condition is wrong?
ifnot(! is a double negate

You're right, logically wrong, and I also find this statement hard to understand, so I change
"tour_bg_sound_disable"
to
"tour_bg_sound_on",
which was much better

Source code

1
2
3
if(plugin[soundinterface].tour_bg_sound_on AND tour_soundson,
  mutesound(tour_bg_sound,true);
);

5

Monday, September 21st 2020, 5:02am

Hi,

I can confirm - yes, there is a bug in the mutesound() action (internally a simple typo).
That will be fixed in the next release.

As alternative you could use:

Source code

1
set(sound[tour_bg_sound].muted, true);

That's exactly the same that mutesound(tour_bg_sound) would do.

Best regards,
Klaus

Many thanks!