Voice sample rate

This commit is contained in:
Garry Newman 2016-07-07 14:15:09 +01:00
parent 3844c74d9c
commit 98fe62e4b7
3 changed files with 44 additions and 0 deletions

View File

@ -57,5 +57,15 @@ public void ClientAuthSessionTicket()
Assert.IsTrue( ticket.Handle == 0 );
}
}
[TestMethod]
public void ClientVoiceOptimalSampleRate()
{
using ( var client = new Facepunch.Steamworks.Client( 252490 ) )
{
var rate = client.Voice.OptimalSampleRate;
Assert.AreNotEqual( rate, 0 );
}
}
}
}

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Facepunch.Steamworks
{
public partial class Client : IDisposable
{
private Voice _voice;
public Voice Voice
{
get
{
if ( _voice == null )
_voice = new Voice { client = this };
return _voice;
}
}
}
public class Voice
{
internal Client client;
public uint OptimalSampleRate
{
get { return client._user.GetVoiceOptimalSampleRate(); }
}
}
}

View File

@ -43,6 +43,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Client.Voice.cs" />
<Compile Include="Client.Auth.cs" />
<Compile Include="Client.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />