Skip to content

Commit

Permalink
[AudioToolbox] Add correct trimmer annotations for AudioQueue.GetProp…
Browse files Browse the repository at this point in the history
…erty<T>. (#20363)
  • Loading branch information
rolfbjarne committed Mar 25, 2024
1 parent f8626d7 commit 396c35c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/AudioToolbox/AudioQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using CoreFoundation;
Expand Down Expand Up @@ -987,7 +988,11 @@ public IntPtr GetProperty (AudioQueueProperty property, out int size)
}

// Should be private
#if NET
public unsafe T GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioQueueProperty property) where T : struct
#else
public unsafe T GetProperty<T> (AudioQueueProperty property) where T : struct
#endif
{
int size;

Expand All @@ -1011,7 +1016,11 @@ public unsafe T GetProperty<T> (AudioQueueProperty property) where T : struct
}
}

#if NET
unsafe T GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioConverterPropertyID property) where T : struct
#else
unsafe T GetProperty<T> (AudioConverterPropertyID property) where T : struct
#endif
{
int size;

Expand Down

8 comments on commit 396c35c

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.