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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Trimming Audio Clip

Discussion in 'Audio & Video' started by Hiliox, Apr 22, 2021.

  1. Hiliox

    Hiliox

    Joined:
    Apr 17, 2017
    Posts:
    1
    Hi all,

    I have an audio clip, which starts the sound with a delay.

    So, I want to cut the marked section. I found the "Trimming Clips" manual for 2018.4

    https://docs.unity3d.com/2018.4/Documentation/Manual/TimelineTrimmingClips.html

    But I couldn't find any info about this trimming function and if this was removed for 2020. I use 2020.3.3f1.
    Is this "Trimming Clips" still available?
    If not, what is the best solution for this? I would prefer a non destructive workflow.
     

    Attached Files:

    NNW6 likes this.
  2. ZealUnity

    ZealUnity

    Joined:
    Apr 13, 2014
    Posts:
    61
    I also need a way to trim clips (from code), but the AudioClip class seems pretty underwhelming.

    Is there really no way to analyze/manipulate the raw data of an audio clip from within Unity? Are there any 3rd party plugins on the asset store that make this possible?
     
  3. ZealUnity

    ZealUnity

    Joined:
    Apr 13, 2014
    Posts:
    61
    Gotta be some other people who are also disenchanted with Unity's current audio tools (or lack thereof).

    Is there really no easy way to trim an audio clip like this?
     
  4. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,276
    If you can't trim it externally, a workaround is
    audioSource.time = 0.1f;
    for example before calling Play, which would make it skip the first 1/10 of a second.
     
  5. ZealUnity

    ZealUnity

    Joined:
    Apr 13, 2014
    Posts:
    61
    That could be a possible solution, IF it were possible to record a playing audio clip? Anyone know if that's possible?