Skip to content

Commit

Permalink
Removed redundant variable and renamed rust osc lib. TODO: Legacy par…
Browse files Browse the repository at this point in the history
…ameter notice.
  • Loading branch information
benaclejames committed Mar 26, 2023
1 parent db26ea8 commit 98787fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions VRCFaceTracking/MainStandalone.cs
Expand Up @@ -51,7 +51,6 @@ public static void Teardown()

public static void Initialize()
{
var test2 = BitConverter.GetBytes(69.42);
Logger.Msg("VRCFT Initializing!");

// Parse Arguments
Expand Down Expand Up @@ -111,7 +110,7 @@ public static void Initialize()
while (messageIndex < relevantMessages.Length)
{
byte[] buffer = new byte[4096];
var length = RustLib.create_osc_bundle(buffer, relevantMessages, relevantMessages.Length,
var length = SROSCLib.create_osc_bundle(buffer, relevantMessages, relevantMessages.Length,
ref messageIndex);
if (length > 4096)
throw new Exception("Bundle size is too large! This should never happen.");
Expand Down
5 changes: 3 additions & 2 deletions VRCFaceTracking/OSC/OSCMessage.cs
Expand Up @@ -34,7 +34,8 @@ public struct OscMessageMeta {
public OscValue Value;
}

public static class RustLib
// Simple Rust OSC Lib wrapper
public static class SROSCLib
{
[DllImport("fti_osc.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern bool parse_osc(byte[] buffer, int bufferLength, ref OscMessageMeta message);
Expand Down Expand Up @@ -110,6 +111,6 @@ private OscMessage(string address, OscValueType typeIdentifier)

public OscMessage(string address, Type type) : this(address, OscUtils.TypeConversions[type].oscType) {}

public OscMessage(byte[] bytes) => RustLib.parse_osc(bytes, bytes.Length, ref _meta);
public OscMessage(byte[] bytes) => SROSCLib.parse_osc(bytes, bytes.Length, ref _meta);
}
}

0 comments on commit 98787fe

Please sign in to comment.