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
0
votes
1 answer

How do I add looping on HTML5 audio?

I need help looping a HTML5 audio clip. I have the below script, but it only plays once. I need it to play the music clip when the link is pressed and plays non-stop in a loop. The audio can only then be stopped when refreshing the page or but…
Timothy
  • 1
  • 2
0
votes
0 answers

Encrypting and decrypting audio clip to file unity

I'm using AES for encrypting and decrypting, I can write it to a file and when I try to read the file back to audio clip, I'm getting input exception I tried to convert the audio file to base64 byte array while saving in file so that when I read the…
0
votes
1 answer

Unity - issue with AudioClip array

I'm trying to make an audio player in Unity. I first created a ResourceManager, that has a AudioClip[] array. public class ResourceManager : MonoBehaviour { public AudioSource audioSrc; public AudioClip[] clips; private int trackNum =…
Roy
  • 63
  • 8
0
votes
1 answer

The Sonos audioclip api reduces auth param length

The Sonos audioclip api https://developer.sonos.com/reference/control-api/audioclip/loadaudioclip/ allows passing in the httpAuthorization param that is then passed along as an Authorization header. Not sure why, but the auth param is being reduced…
sheenz
  • 1
  • 2
0
votes
0 answers

JavaFX AudioClip MEDIA_UNSUPPORTED : Unrecognized file signature, updating deprecated code

Basically I'm tryin' to update some old code with deprecated java applet stuff to javafx, I think the main problem for some reason that javafx's audioclip doesn't support ".au" files and I'm getting this error, I'd like to know if there is anyway to…
Stellar
  • 1
  • 4
0
votes
1 answer

Why are some audio files not working when trying to play them in Unity?

I am making a 2D game in which I wanted to attach an audio file to a button. I was able to do this successfully. But later I felt like changing that sound. So I simply replaced it with another audio file. Then it stopped working! When I again…
Aravind
  • 31
  • 2
  • 11
0
votes
0 answers

Cannot get AudioClip to work with Javafx

I'm trying to get AudioClip to play a WAV file using my Professors animation template but I can't seem to get it to work. I get the following errors: Exception in thread "Thread-4" java.lang.IllegalArgumentException: uri.getScheme() == null! uri…
Zach
  • 59
  • 4
0
votes
0 answers

After converting the external MP3 with NAudio to Unity AudioClip, the memory cannot be released

A few days ago, I wanted to convert the external MP3 with NAudio to Unity AudioClip, but after that,the memory cannot be released! See this post. I've found several places that can cause memory not to be released, especially in "WAV wav = new…
0
votes
1 answer

How to change volume/alter AudioClip

I've seen methods to change Clip volume, however, I am using an AudioClip (code below). Is there a good way to change the volume of the clip? Or would I have to instead use a Clip? private static AudioClip getcharend() { File file = new…
Dan
  • 13
  • 1
  • 4
0
votes
1 answer

executable jar + audioclips

I've been getting this exception when running the app from an executable jar: java.lang.UnsupportedOperationException: Unsupported protocol "rsrc" at com.sun.media.jfxmedia.locator.Locator.(Locator.java:233) at…
Igal Klebanov
  • 348
  • 2
  • 15
-1
votes
1 answer

JavaFX AudioClip doesn't play certain mp3 files

I'm having some issues playing mp3 files using AudioClip with JavaFX. my code is like this: // define String path to mp3 file myFilePath = "path/to/file.mp3"; // Create an AudioClip Object from path audioToPlay = new…
TLT-Dave
  • 14
  • 1
  • 3
-1
votes
1 answer

JavaFX AudioClip.play()

I am creating a JavaFX application that uses sounds for example for Button hovering. I create an JavaFX AudioClip to create and play the sound. It works ok so far (meaning: I hear the sound). When the play(); method is called, the sound is played…
WarWolfen
  • 241
  • 1
  • 3
  • 11
-1
votes
1 answer

how to connect AudioClip at local file

I downloaded the .mp3 file from the server and stored it in my android persistentDataPath. But I do not know how to connect .mp3 files to AudioClip. Please let me know if there is a workaround for this.
Bert Hu
  • 9
  • 7
-2
votes
1 answer

Audio null in unity

I am getting this weird error in unity when I am trying to run my (sad excuse for a) game. Here's the code using System.Collections; using System.Collections.Generic; using UnityEngine; public class ARsound : MonoBehaviour { public static…
GraniteSOS
  • 49
  • 2
  • 10
1 2
3