public AudioBuffer(uint sampleCount, uint samplesPerSecond, AudioChannelFormat channelFormat) { _samples = new short[sampleCount]; _position = 0; SamplesPerSecond = (int)samplesPerSecond; ChannelFormat = channelFormat; }
public XAudio2SourceVoice(IntPtr instance, AudioChannelFormat channelFormat, int frequency) : base(instance) { ChannelFormat = channelFormat; Frequency = frequency; StartNative = GetDelegateForVTable <StartDelegate>(19); SubmitSourceBufferNative = GetDelegateForVTable <SubmitSourceBufferDelegate>(21); GetStateNative = GetDelegateForVTable <GetStateDelegate>(25); }
public XAudio2Clip(int samples, AudioChannelFormat channelFormat, int frequency) : base(samples, channelFormat, frequency) { _buffer = new short[samples * (int)channelFormat]; _bufferHandle = GCHandle.Alloc(_buffer, GCHandleType.Pinned); }
protected AudioClip(int samples, AudioChannelFormat channelFormat, int frequency) : base(null) { SampleCount = samples; ChannelFormat = channelFormat; Frequency = frequency; }
public static AudioClip Create(int samples, AudioChannelFormat channelFormat, int frequency) { return(Audio.Driver.CreateClip(samples, channelFormat, frequency)); }
public IOSAudioClip(int samples, AudioChannelFormat channelFormat, int frequency) : base(samples, channelFormat, frequency) { Format = new AVAudioFormat((double)frequency, (uint)(channelFormat == AudioChannelFormat.Mono ? 1 : 2)); Buffer = new AVAudioPcmBuffer(Format, (uint)samples); }
public AudioClip CreateClip(int samples, AudioChannelFormat channelFormat, int frequency) { return(new IOSAudioClip(samples, channelFormat, frequency)); }