x


Loading ogg though WWW results in 3D Sound, need as 2D...

How do I force though script the loaded audio to be set as 2D sound?

I'm trying try load in our music file to play in the background. When loading from WWW source I can't seem to find the option to set the audio as a 2D sound, it is intended to be an Omni sound but ends up being a 3D sound.

more ▼

asked Dec 06 '10 at 03:34 AM

drastick gravatar image

drastick
226 8 10 18

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Hi, This will be an option in 3.2. For now use .panLevel = 0.0f on the audiosource playing the clip (this will make it play in 2D)

-Sren

more ▼

answered Jan 05 '11 at 12:20 PM

Sren Christiansen gravatar image

Sren Christiansen
254 1 7

(comments are locked)
10|3000 characters needed characters left

Jee.. This means I am doing something wrong. However the sound is constant nomather how far the camera (with listener) is from the source:

var download = new WWW (path); yield download; var clip : AudioClip = download.oggVorbis; if (clip != null) { audio.clip = clip; audio.rolloffMode = AudioRolloffMode.Logarithmic; audio.spread=0.25; audio.minDistance=1; audio.minDistance=10; audio.ignoreListenerVolume=true;
audio.panLevel = 1f; audio.Play(); }

Any clue? Is there any way of forcing a sound to become 3d?

more ▼

answered Jun 23 '11 at 06:03 PM

xtnz gravatar image

xtnz
-4 1 1 1

panLevel, should be 0.0f (not 1f)

Jul 13 '11 at 12:58 PM Sren Christiansen

Not an answer. If you have a question, Ask it, don't add an "Answer" to an old question.

Jul 13 '11 at 01:03 PM Waz
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1031
x527
x527
x454
x21

asked: Dec 06 '10 at 03:34 AM

Seen: 2103 times

Last Updated: Jul 13 '11 at 01:03 PM