Create() public static method

Creates a user AudioClip with a name and with the given length in samples, channels and frequency.

public static Create ( string name, int lengthSamples, int channels, int frequency, bool stream ) : AudioClip
name string Name of clip.
lengthSamples int Number of sample frames.
channels int Number of channels per frame.
frequency int Sample frequency of clip.
stream bool True if clip is streamed, that is if the pcmreadercallback generates data on the fly.
return AudioClip
Example #1
0
 public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream)
 {
     return(AudioClip.Create(name, lengthSamples, channels, frequency, stream, null, null));
 }
Example #2
0
 public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool stream, AudioClip.PCMReaderCallback pcmreadercallback)
 {
     return(AudioClip.Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, null));
 }
Example #3
0
 public static AudioClip Create(string name, int lengthSamples, int channels, int frequency, bool _3D, bool stream, AudioClip.PCMReaderCallback pcmreadercallback, AudioClip.PCMSetPositionCallback pcmsetpositioncallback)
 {
     return(AudioClip.Create(name, lengthSamples, channels, frequency, stream, pcmreadercallback, pcmsetpositioncallback));
 }