- Home /
What are the parameters to the AudioClip.create() function
I am currently making a game like AudioSurf and right now I have it where the user can select an mp3 file from their computer. I am using NAudio to get the samples from the mp3 file and the data such as the sample rate used and the number of channels. I am familiar with the Unity engine and I have been teaching myself digital audio and I have gone through a couple of courses that I found on pluralsight. I am trying to create an AudioClip using the information from the mp3 that the user selects but I don't understand the parameters that are required and the scripting API doesn't do that great of a job at explaining them. I am really confused as to what the second parameter is, the lengthSamples. I understand that the channels is the number of channels and the frequency is the sample rate but I don't understand what the lengthSamples is. Could someone please explain this?
Your answer
Follow this Question
Related Questions
Music will not change when an event triggers it 3 Answers
Unity Unable to Reassign Audio Clip 1 Answer
Randomly mp3 sript, playing just first song 1 Answer
Dynamic Backgroundmusic 1 Answer
Event at audio position? 1 Answer