Questions tagged [audioclip]

AudioClip is a class in Unity which allows to store an audio clip, and can be attached to an AudioSource.

AudioClip is a class in which allows to store an audio clip, which can be assigned to an AudioSource. The class can be assigned an audio file asset in several formats, and then programmatically accessed in scripts.

AudioClip Documentation

Audio Clip reference within scripts

44 questions
1
vote
1 answer

Sonos Cloud API: audioClip synchronised playing in group

Will it be possible in the future to be able to play a audioClip for a whole group? Now one should iterate all players manually, by which the triggered audioClip is not being played in sync. Is it planned to be added to the groups (or even the…
Bartel
  • 402
  • 2
  • 13
1
vote
1 answer

Unity3D: Resource.Load defined AudioClip ends up Null going into the AudioSource

What I'm trying to do is contain an audio file in a folder (under Resources) where I can drop any qualifying audio file in the specified folder and have the numerous triggers in my program read from that single point (which is why my AudioClip below…
1
vote
2 answers

Unity 2019 - How can I save mixer audio output to an AudioClip or load a newly saved .wav to an audioclip at runtime?

I'm making a game with musical instruments and a recording device in-game. I want the user to be able to play the instruments and record them to an audioclip - and to a wav file - which they can then play back as accompaniment to themselves playing…
1
vote
1 answer

Load a folder of files defined by the user at runtime? Custom radio

I am trying to create custom radio tracks in my Unity game, and I want the user to be able to place audio files in a directory like My Documents/My Games/Unity Game/Custom Sounds/ . Then I want Unity to put all audio clips from this folder into an…
Toxxic
  • 57
  • 1
  • 1
  • 6
1
vote
2 answers

Serialize GameObject in Unity

I have class like - [serializable] public class DemoClass{ [SerializeField] public GameObject gameObject; } I want to store data using serializable. Unity doc says GameObject is serializeField. But it gives Exception…
1
vote
2 answers

How can I use a classes pre defined delegates in C#

Im fairly new to programming and am currently attempting to learn how to use delegates in C#. I've read the C# delegates programming guide on MSDN and have looked at some other examples on Stack Overflow. I think I get the overall concept, but am…
AlexC
  • 39
  • 4
0
votes
1 answer

Python/Audio Classification - Split audio file based on repetition

I'm creating a audio classification model for animal sounds. It's a hobby project, just to get myself familiarized with the techniques. The thing that I'm struggling with is the duration differences of my audio clips and how I should cut them into…
user2133561
  • 155
  • 1
  • 10
0
votes
1 answer

How to convert base64 mpeg to AudioClip in Unity? (part 2)

(continuing to the question here... ) After some research, I have got the following: private float[] Normalize(float[] data) { float max = float.MinValue; for (int i = 0; i < data.Length; i++){ if (System.Math.Abs(data[i]) > max)…
Chong Lip Phang
  • 8,755
  • 5
  • 65
  • 100
0
votes
1 answer

Unity something went wrong when play too many audio clips simultaneously

I'm making a rhythm game, and I use 'AudioSource.PlayOneShot()' function to play the hit sound when the player hits the note. I downloaded a beatmap from Osu!Mania to test my game. I found when there's too many audio clips playing simultaneously (20…
Buger404
  • 13
  • 3
0
votes
0 answers

Why is there no sound whenever I am clicking the sound icon?

(here is what shows on console...) uncaught (in promise) DOMException: The element has no supported sources. playSound @ script.js:36 onclick @ index.html:1] I have made a dictionary app using API and whenever I click the sound icon for phonetics,…
Pau
  • 11
  • 3
0
votes
0 answers

Skip AudioSource sound on start

Hello I have sound which is playing on collision with layer "ground" of my object. But my object is standing on layer "Ground" from the beggining so it is triggerig my sound. How can I prevent it? private void OnCollisionEnter2D(Collision2D…
Golden
  • 1
0
votes
1 answer

Change Song on Button Press

I am trying to create a Music button and each time this button is pressed the song will change. In total, I have 4 songs. So, when the button is pressed the 1st time, song 1 will play. When the button is pressed for the 2nd time, song 2 will play…
Z.Mizzi
  • 13
  • 2
0
votes
0 answers

Unity3d how to play streamed audio via Audioclip?

I am streaming audio via websocket from IBM Watson TTS, currently I already have the audio playing from the stream with NAudio, but I would like to shift out NAudio for the builtin audioclip ( NAudio is great, but would like to be compatible with…
bomanden
  • 314
  • 1
  • 2
  • 16
0
votes
1 answer

How to loop audio clip in unity infinitely

I set my audio clip to loop (by checking off the loop checkbox in the audio source) however, after about an hour the audio stops playing. How do I fix this? Is there code that I have to add to the script? Apparently the loop function is not…
spjennie
  • 3
  • 2
0
votes
1 answer

How can i import a .mp3 file into Eclipse used for an audioClip in JavaFX

I want to add an AudioClip to my Game. I used Java and JavaFX and wrote my Code in Eclipse. The error that shows up is java.lang.IllegalAccessError: class com.sun.media.jfxmediaimpl.NativeMediaManager (in unnamed module @0x5e355576) cannot access…
niMtAndoX
  • 9
  • 2