Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xcode12] [Bug][AudioUnit] Add [Obsolete] to write access for read-only property #9423

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/AudioUnit/AudioUnit.cs
Expand Up @@ -679,11 +679,13 @@ public AudioUnitStatus MusicDeviceMIDIEvent (uint status, uint data1, uint data2
return MusicDeviceMIDIEvent (handle, status, data1, data2, offsetSampleFrame);
}

#if !XAMCORE_4_0
[Obsolete ("This API has been removed.")]
public AudioUnitStatus SetLatency (double latency)
{
// ElementCount: Float64, AudioUnitScopeType.Global is the only valid scope for Latency.
return AudioUnitSetProperty (handle, AudioUnitPropertyIDType.Latency, AudioUnitScopeType.Global, 0, ref latency, sizeof (double));
return AudioUnitStatus.OK;
}
#endif

[DllImport (Constants.AudioUnitLibrary)]
static extern AudioUnitStatus AudioUnitGetProperty (IntPtr inUnit, AudioUnitPropertyIDType inID, AudioUnitScopeType inScope, uint inElement, ref double outData, ref uint ioDataSize);
Expand Down