BroAudio
Quick StartScripting APIAsset Store
  • Overview
    • Introduction
    • Getting Started
    • Compatibility
  • Core Features
    • Library Manager
      • Create The Library
      • Design The Sound
        • 🔊Volume
        • 🎚️Fading
        • 🔁Looping
        • 🎲Randomization
        • 💪Velocity
        • 🎛️Spatial & Mix
    • Audio Player
      • Music Player
      • Dominator Player
    • Playback Group
    • Audio Effect
    • No-Code Components
      • Sound Source
      • Sound Volume
      • Spectrum Analyzer
    • Addressables
    • Customization
  • Designs
    • Audio Mixer
  • Tools
    • Audio Clip Editor
    • Audio Effect Editor
    • Useful Attrubutes
  • Reference
    • Scripting API
      • Class
        • BroAudio
        • SoundSource
        • BroAdvice
      • Interface
        • IAudioPlayer
        • IMusicPlayer
        • IPlayerEffect
        • IAutoResetWaitable
        • IAudioSourceProxy
      • Struct
        • SoundID
        • Effect
        • Fading
      • Enums
        • BroAudioType
        • EffectType
        • StopMode
        • Transition
        • Ease
    • Unity API Integration
    • Audio Terminology
    • Technical Details
  • Others
    • Release Notes
    • Known Issues
      • Duplicate SoundID Issue
    • Roadmap
    • Support & Contact
Powered by GitBook
On this page
  • Public Variables
  • Public Methods
  1. Reference
  2. Scripting API
  3. Class

SoundSource

The class of the SoundSource component

Last updated 2 months ago

NameSpace
Accessibility

Ami.BroAudio

public

Public Variables

Variable
Type
Description

CurrentPlayer

The currently playing player

IsPlaying

bool

Whether the CurrentPlayer is playing

Public Methods

Method
Return
Parameters
Description

Play

void

id

Plays the audio base on the current PositionMode

void

id, Vector3 position

Plays audio in 3D space at the given position (SpatialBlend will be set to 3D automatically)

void

id, Transform followTarget

Plays audio in 3D space and keeps it following the target continuously (SpatialBlend will be set to 3D automatically)

PlayGlobally

void

id

Plays audio globally (2D)

Stop

void

Stop playing audio

void

float fadeOut

Stop playing audio by the given fadeOut time

SetVolume

void

float volume

Immediately sets the volume of the currently playing player

void

float volume, float fadeTime

Adjusts the volume of the currently playing player over the specified fade duration

SetPitch

void

float pitch

Immediately sets the pitch of the currently playing player

void

float pitch, audioType

Adjusts the pitch of the currently playing player over the specified fade duration

IAudioPlyer
SoundID
SoundID
SoundID
SoundID
BroAudioType