Skip to content

Commit

Permalink
Rename hostname to address as regular hostnames are not actually supp…
Browse files Browse the repository at this point in the history
…orted.
  • Loading branch information
fgimian committed Jan 27, 2025
1 parent c930801 commit a6895a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ represent the application defaults.

You may live-reload your updated configuration by right-clicking on the TotalMix Volume Control
tray icon and selecting "Reload config" which will update all settings except those related to
OSC (i.e. hostnames and ports). You will need to restart the application if you wish to change
OSC (i.e. addresses and ports). You will need to restart the application if you wish to change
OSC settings.

## Building from Source
Expand Down
10 changes: 5 additions & 5 deletions config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
# ARGB components (note that the alpha channel needs to be first if you ant transparency).

[osc]
# The hostname port that TotalMix Volume Control should send to. TotalMixFX listens on 0.0.0.0 so
# the hostname may be any IP address on your network. Generally 127.0.0.1 (localhost) is
# The address and port that TotalMix Volume Control should send to. TotalMixFX listens on 0.0.0.0
# so the address may be any IP address on your network. Generally 127.0.0.1 (localhost) is
# recommended. The port should be set to match the "Port incoming" setting in TotalMixFX.
outgoing_hostname = "127.0.0.1"
outgoing_address = "127.0.0.1"
outgoing_port = 7001

# The hostname and port that TotalMix Volume Control should receive from. This should be set to
# The address and port that TotalMix Volume Control should receive from. This should be set to
# match the "Port outgoing" setting in TotalMixFX.
incoming_hostname = "127.0.0.1"
incoming_address = "127.0.0.1"
incoming_port = 9001

[volume]
Expand Down
8 changes: 4 additions & 4 deletions src/TotalMixVC/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,16 +324,16 @@ protected override void OnStartup(StartupEventArgs e)
try
{
_volumeManager = new(
outgoingEP: new IPEndPoint(_config.Osc.OutgoingHostname, _config.Osc.OutgoingPort),
incomingEP: new IPEndPoint(_config.Osc.IncomingHostname, _config.Osc.IncomingPort)
outgoingEP: new IPEndPoint(_config.Osc.OutgoingAddress, _config.Osc.OutgoingPort),
incomingEP: new IPEndPoint(_config.Osc.IncomingAddress, _config.Osc.IncomingPort)
);
}
catch (SocketException)
{
MessageBox.Show(
"Unable to open a listener to receive events from the device. Please exit any "
+ "applications that are binding to UDP address "
+ $"{_config.Osc.OutgoingHostname}:{_config.Osc.OutgoingPort} and try "
+ $"{_config.Osc.OutgoingAddress}:{_config.Osc.OutgoingPort} and try "
+ "again.\n\nThe application will now exit.",
caption: "Socket Error",
button: MessageBoxButton.OK,
Expand Down Expand Up @@ -489,7 +489,7 @@ await _joinableTaskFactory.SwitchToMainThreadAsync(
s_communicationErrorFormatString,
_config.Osc.OutgoingPort,
_config.Osc.IncomingPort,
_config.Osc.IncomingHostname
_config.Osc.IncomingAddress
);
_trayIcon.ToolTipText = "TotalMixVC - Unable to connect to your device";
}
Expand Down
8 changes: 4 additions & 4 deletions src/TotalMixVC/Configuration/Osc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ namespace TotalMixVC.Configuration;
/// <summary>Provides configuration related to OSC communication with the device.</summary>
public record Osc
{
/// <summary>Gets the hostname to send volume changes to.</summary>
/// <summary>Gets the address to send volume changes to.</summary>
[JsonConverter(typeof(IPAddressConverter))]
public IPAddress OutgoingHostname { get; init; } = IPAddress.Loopback;
public IPAddress OutgoingAddress { get; init; } = IPAddress.Loopback;

/// <summary>
/// Gets the port to use when sending volume changes. This should match the "Port incoming"
Expand All @@ -18,10 +18,10 @@ public record Osc
[JsonConverter(typeof(PortIntegerConverter))]
public int OutgoingPort { get; init; } = 7001;

/// <summary>Gets the hostname to receive volume changes from. This should match the
/// <summary>Gets the address to receive volume changes from. This should match the
/// "Remote Controller Address" and should typically be "127.0.0.1".</summary>
[JsonConverter(typeof(IPAddressConverter))]
public IPAddress IncomingHostname { get; init; } = IPAddress.Loopback;
public IPAddress IncomingAddress { get; init; } = IPAddress.Loopback;

/// <summary>
/// Gets the port to use when receiving volume changes. This should match the "Port outgoing"
Expand Down

0 comments on commit a6895a5

Please sign in to comment.