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 6th 2009, 11:30pm

surround sound

Hello Guys,

I´m wondering if its possible work with surround 5.1 mp3 files or if i can work with 4 different channels (mono files) and put them around the scene as sound hotspots. When the user turn the scene, start hearing the arounder sound (but the 4 files must start at the same time and in synchronicity). Is it possible?

Thank you!!

Daniel

2

Tuesday, September 8th 2009, 11:50am

Hi,

I'm not sure but I think Flash doesn't support more than 2 channels in a mp3 file...
using separate mono (or stereo) files would be possible but if they will start really synchrony can't be not guaranteed...

best regards,
Klaus

3

Tuesday, September 8th 2009, 2:27pm

Hello Klaus,



How can i write the code to make all hotspot sounds start playing automaticaly?

Could you please help me in order to make some tests?


Best Regards,


Daniel

4

Tuesday, September 8th 2009, 2:49pm

Hi,

preloading the sounds before starting playing them could help a bit I think
(but I'm don't know how the Flashplayer will finally handle the loading internally),

e.g. this would be the code to preload the sound files and start playing them after 2 seconds:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<krpano onstart="action(startsounds_step1);">

<plugin name="soundinterface" url="soundinterface.swf" preload="true" />

<action name="startsounds_step1">
  preloadsound(sound1.mp3);
  preloadsound(sound2.mp3);
  preloadsound(sound3.mp3);
  preloadsound(sound4.mp3);
  delayedcall(2, action(startsounds_step2));
</action>

<action name="startsounds_step2">
  playsound3D(s1, sound1.mp3, -45.0, 0, 90.0, 1.0, 0);
  playsound3D(s2, sound2.mp3, +45.0, 0, 90.0, 1.0, 0);
  playsound3D(s3, sound3.mp3, -135.0, 0, 90.0, 1.0, 0);
  playsound3D(s4, sound4.mp3, +135.0, 0, 90.0, 1.0, 0);
</action>

..

</krpano>


details about the soundinterface here:
sound interface plugin (beta)

best regards,
Klaus

5

Tuesday, September 8th 2009, 3:05pm

Great Klaus,



After reading the code it makes a lot of sense (of course, hehe) *whistling*

I´ll make a test with the same file repeated (renamed 4 times) to see if it plays out ou in sync).

Thank you again!!
Daniel

Sergey74

Trainee

Posts: 128

Location: Russia, Chelyabinsk

Occupation: professional noob

  • Send private message

6

Saturday, March 20th 2010, 10:45am

Hello, Klaus!
I used your example as described above.
But in some cases I desync audio tracks. I do not know how to fix it. It is even possible?
Sorry for my English, I use Google translator

http://panosphera.ru/galereya/krpano/makintosh/

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
	<action name="startsounds_step1">
  preloadsound(sounds/sound1.mp3);
  preloadsound(sounds/sound2.mp3);
  preloadsound(sounds/sound3.mp3);
  delayedcall(2, action(startsounds_step2));
	</action>

	<action name="startsounds_step2">
  playsound3D(s1, sounds/sound1.mp3, -35, -1, 30, 1.5, 0);
  playsound3D(s2, sounds/sound2.mp3, -10,  9, 30, 1.5, 0);
  playsound3D(s3, sounds/sound3.mp3,  10, -2, 30, 1.5, 0);

  playsound3D(s4, sounds/sound1.mp3, -35, -1, 300, 1, 0);
  playsound3D(s5, sounds/sound2.mp3, -10,  9, 300, 1, 0);
  playsound3D(s6, sounds/sound3.mp3,  10, -2, 300, 1, 0);
	</action>
translation difficulties *huh*

Similar threads