Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question system audio to audio clip

Discussion in 'Audio & Video' started by jordanjc280, Aug 12, 2022.

  1. jordanjc280

    jordanjc280

    Joined:
    Jul 30, 2022
    Posts:
    3
    i've been trying to figure out how to get the system audio to an audio clip for an audio visualiser for a while not but i cant seem to figure out how. i've tried using Naudio and CSCore but neither of those seem to be able to turn the audio in to a .wav or a .mp3 to then be put into an audio clip.

    does anyone know any other solutions?

    (also im on windows if that helps at all)
     
    Last edited: Aug 12, 2022
  2. HotYearKit

    HotYearKit

    Joined:
    Dec 4, 2018
    Posts:
    9
    var uwrm = UnityWebRequestMultimedia.GetAudioClip(new Uri(Mp3FilePath, UriKind.Absolute), AudioType.MPEG);
    yield return uwrm.SendWebRequest();
    if (string.IsNullOrEmpty(uwrm.error))
    {
    //play audio
    MAudioSource.Stop();
    MAudioSource.clip = DownloadHandlerAudioClip.GetContent(uwrm);
    MAudioSource.Play();
    }
     
    Last edited: Aug 15, 2022
  3. jordanjc280

    jordanjc280

    Joined:
    Jul 30, 2022
    Posts:
    3
    can you explain this a bit more? sorry im not quite sure what a lot of these things are