Sie sind nicht angemeldet.

1

Dienstag, 5. Januar 2021, 10:43

Seek Sound

Hi guys,
so I wanted to play background sound in my tour.
So far so good, that works.

But I want to start the backgroundsound at a random second.
THIS

Quellcode

1
2
3
4
5
mul(val, random, 9);
    	roundval(val);
    	
    	playsound('backgroundsound','%VIEWER%/files/audio.mp3',true,1);
    	seeksound('backgroundsound', val);

sadly does not work. It still starts from the beginning.
When I trace val and the soundposition I get something like
"val = 3"
"pos = 0"
Obviously val is random, but the position is always 0.
Whats my problem here? Am I not seeing something obvious?

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

2

Dienstag, 5. Januar 2021, 10:59

Hi,

Quellcode

1
seeksound('backgroundsound', val);

should be

Quellcode

1
seeksound('backgroundsound', get(val));


or

Quellcode

1
seeksound('backgroundsound', calc(val));


Hope it helps!
Tuur *thumbsup*

Ähnliche Themen