using multiple audio sources

hello i want to use multiple audio sources in an object you know now i m using an audio source
and on trigger of collider i use

GetComponent<AudioSource>().Play();

or stop…
but having a lot of audio files is more complex…
how can i do it using c#
using getcomponent…??
thanks in advance

you could use an AudioClip Array and then set the clip of your source to a clip from the array.
This would be the case if you want to play e.g. background music

 public AudioClip[] m_clips;
  private AudioSource m_aSource;

  void Start()
  {
    m_aSource = GetComponent<AudioSource>();
  }

  public void SwitchMusic(int _id)
  {
    if (m_aSource.isPlaying)
      m_aSource.Stop();
    m_aSource.clip = m_clips[_id];
    m_aSource.Play();
  }

if you want more audiofiles played the same time you could add multiple audiosources to your gameobject (in the inspector)

and in the code

//in this array you would drag and drop your audiosources in the inspector
  public AudioSource[] m_sources;

public void PlayerSFX_PlayerJump()
{
  m_sources[0].Play();
}