I want get byte data from an object AudioClip.
I have code follow:
public AudioClip myAudio;
public byte[ ] GetByteFunc(AudioClip a)
{
byte[ ] arr;
........ ........
...............
return arr;
}
Please ![]()
I want get byte data from an object AudioClip.
I have code follow:
public AudioClip myAudio;
public byte[ ] GetByteFunc(AudioClip a)
{
byte[ ] arr;
........ ........
...............
return arr;
}
Please ![]()
did you check the docs? Unity - Scripting API: AudioClip.GetData
I don’t understand with above link.
samples is array Float[ ]. But i want get array binary data from wave file in object AudioClip ?
GetData uses float[ ] because SetData uses float[ ]. Why do you want byte[ ]?
–Eric
Because with byte[ ]. I can use my library. (input function in library is byte[ ])
please help me !!!
I would like this too, since I need to compress the sound and would rather have one compression algorithm than have a byte[ ] and float[ ] compression classes. Any suggestions?
~lanDog