public static AudioSampleRate RecommendSampleRate(Instance instance) => (AudioSampleRate)PPBAudioConfig.RecommendSampleRate(instance);
public static uint RecommendSampleFrameCount(Instance instance, AudioSampleRate sampleRate, uint requestedSampleFrameCount) => PPBAudioConfig.RecommendSampleFrameCount(instance, (PPAudioSampleRate)sampleRate, requestedSampleFrameCount);
/// <summary> /// A constructor that creates an audio config based on the given sample rate /// and frame count. If the rate and frame count aren't supported, the /// resulting resource will be is_null(). You can pass the result of /// RecommendSampleFrameCount() as the sample frame count. /// </summary> /// <param name="instance">The instance associated with this resource.</param> /// <param name="sampleRate">The sample rate <see cref="AudioSampleRate"/></param> /// <param name="sampleFrameCount">A uint frame count returned from the /// <code>RecommendSampleFrameCount</code> function.</param> public AudioConfig(Instance instance, AudioSampleRate sampleRate, uint sampleFrameCount) { handle = PPBAudioConfig.CreateStereo16Bit(instance, (PPAudioSampleRate)sampleRate, sampleFrameCount); SampleRate = sampleRate; SampleFrameCount = sampleFrameCount; }