Skip to content

Commit

Permalink
Fixed Steam Voice functions crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
rlabrecque committed Jun 20, 2017
1 parent 65de793 commit 79ed7fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Plugins/Steamworks.NET/autogen/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2138,10 +2138,10 @@ internal static class NativeMethods {
public static extern void ISteamUser_StopVoiceRecording();

[DllImport(NativeLibraryName, CallingConvention = CallingConvention.Cdecl)]
public static extern EVoiceResult ISteamUser_GetAvailableVoice(out uint pcbCompressed);
public static extern EVoiceResult ISteamUser_GetAvailableVoice(out uint pcbCompressed, IntPtr pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated);

[DllImport(NativeLibraryName, CallingConvention = CallingConvention.Cdecl)]
public static extern EVoiceResult ISteamUser_GetVoice([MarshalAs(UnmanagedType.I1)] bool bWantCompressed, byte[] pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten);
public static extern EVoiceResult ISteamUser_GetVoice([MarshalAs(UnmanagedType.I1)] bool bWantCompressed, byte[] pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten, [MarshalAs(UnmanagedType.I1)] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, IntPtr nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated);

[DllImport(NativeLibraryName, CallingConvention = CallingConvention.Cdecl)]
public static extern EVoiceResult ISteamUser_DecompressVoice(byte[] pCompressed, uint cbCompressed, byte[] pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten, uint nDesiredSampleRate);
Expand Down
4 changes: 2 additions & 2 deletions Plugins/Steamworks.NET/autogen/isteamuser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public static void StopVoiceRecording() {
/// </summary>
public static EVoiceResult GetAvailableVoice(out uint pcbCompressed) {
InteropHelp.TestIfAvailableClient();
return NativeMethods.ISteamUser_GetAvailableVoice(out pcbCompressed);
return NativeMethods.ISteamUser_GetAvailableVoice(out pcbCompressed, IntPtr.Zero, 0);
}

/// <summary>
Expand All @@ -145,7 +145,7 @@ public static EVoiceResult GetAvailableVoice(out uint pcbCompressed) {
/// </summary>
public static EVoiceResult GetVoice(bool bWantCompressed, byte[] pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten) {
InteropHelp.TestIfAvailableClient();
return NativeMethods.ISteamUser_GetVoice(bWantCompressed, pDestBuffer, cbDestBufferSize, out nBytesWritten);
return NativeMethods.ISteamUser_GetVoice(bWantCompressed, pDestBuffer, cbDestBufferSize, out nBytesWritten, false, IntPtr.Zero, 0, IntPtr.Zero, 0);
}

/// <summary>
Expand Down

0 comments on commit 79ed7fa

Please sign in to comment.