mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 14:48:02 +03:00
Voice sample rate
This commit is contained in:
parent
3844c74d9c
commit
98fe62e4b7
@ -57,5 +57,15 @@ namespace Facepunch.Steamworks.Test
|
|||||||
Assert.IsTrue( ticket.Handle == 0 );
|
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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
33
Facepunch.Steamworks/Client.Voice.cs
Normal file
33
Facepunch.Steamworks/Client.Voice.cs
Normal 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(); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -43,6 +43,7 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Client.Voice.cs" />
|
||||||
<Compile Include="Client.Auth.cs" />
|
<Compile Include="Client.Auth.cs" />
|
||||||
<Compile Include="Client.cs" />
|
<Compile Include="Client.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user