Exemplo n.º 1
0
 // Initializes the source.
 private bool InitializeSource()
 {
     if (id < 0)
     {
         id = GvrAudio.Create(hrtfEnabled);
         if (id >= 0)
         {
             GvrAudio.UpdateAudioSource(id, transform, bypassRoomEffects, gainDb, spread, rolloffMode,
                                        sourceMinDistance, sourceMaxDistance, directivityAlpha,
                                        directivitySharpness, currentOcclusion);
             audioSource.spatialize = true;
             audioSource.SetSpatializerFloat(0, (float)id);
             audioSource.SetSpatializerFloat(1, (float)GvrAudio.SpatializerType.Source);
         }
     }
     return(id >= 0);
 }