Skip to content

Instantly share code, notes, and snippets.

@martindevans
Last active November 23, 2017 14:22
Show Gist options
  • Save martindevans/e79a227dce3c73a3bdf2da8759e27fcd to your computer and use it in GitHub Desktop.
Save martindevans/e79a227dce3c73a3bdf2da8759e27fcd to your computer and use it in GitHub Desktop.
// CTL_out
#if UNITY_ANDROID || UNITY_LINUX
// Fake the new symbol in C#
internal static int dissonance_opus_encoder_ctl_out(IntPtr st, Ctl request, out int value)
{
opus_encoder_ctl(st, request, out value);
}
// Import the old symbol
[DllImport("opus", CallingConvention = CallingConvention.Cdecl)]
internal static extern int opus_encoder_ctl(IntPtr st, Ctl request, out int value);
#else
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
#else
[DllImport("opus", CallingConvention = CallingConvention.Cdecl)]
#endif
internal static extern int dissonance_opus_encoder_ctl_out(IntPtr st, Ctl request, out int value);
#endif
// CTL_in
#if UNITY_ANDROID || UNITY_LINUX
// Fake the new symbol in C#
internal static int dissonance_opus_encoder_ctl_in(IntPtr st, Ctl request, int value)
{
opus_encoder_ctl(st, request, out value);
}
// Import the old symbol
[DllImport("opus", CallingConvention = CallingConvention.Cdecl)]
internal static extern int opus_encoder_ctl(IntPtr st, Ctl request, int value);
#else
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
#else
[DllImport("opus", CallingConvention = CallingConvention.Cdecl)]
#endif
internal static extern int dissonance_opus_encoder_ctl_in(IntPtr st, Ctl request, int value);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment