Skip to content

Commit

Permalink
Fix Audio Player and DolphinBarMode/FFmpeg hardcoding (temp)
Browse files Browse the repository at this point in the history
* Give the library a proper name of its own. FINALLY!
* No more FFmpeg hardcoding, now ffmpeg.exe must be in your %PATH%, or working directory (usually the folder containing the program). ALSO FINALLY!
* The Load Sound button is no longer grayed out 24/7.
* Cleanup and remove unused project configurations.
* Add support for both Bluetooth AND DolphinBar connections. (its still a hardcoded hack for now, and probably needs more testing)
* Relabel Play buttons to improve clarity. From "Play Real" -> "Play on Computer".
* Disabled AutoConnect and Unpair settings in the current projects. These turned out to work terribly on Windows 10 and will be better off inactive until resolved. TODO: This can probably be worked around with a version check, but that will need to be explicitly clarified.
  • Loading branch information
trigger-segfault committed Jan 10, 2020
1 parent d6d4908 commit 79f6b6b
Show file tree
Hide file tree
Showing 21 changed files with 103 additions and 244 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*.userosscache
*.sln.docstates

# Testing files
*.wav

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# WiimoteLib.Net (Name subject to change)
# TriggersTools.WiimoteConnect ![AppIcon](https://i.imgur.com/EM71rRs.png)

[![Creation Date](https://img.shields.io/badge/created-september%202018-A642FF.svg?style=flat)](https://github.com/trigger-death/WiimoteLib.Net/commit/60207025642ca1221c452f9e014bf8d86d12aa70)
[![Discord](https://img.shields.io/discord/436949335947870238.svg?style=flat&logo=discord&label=chat&colorB=7389DC&link=https://discord.gg/vB7jUbY)](https://discord.gg/vB7jUbY)
Expand Down
5 changes: 4 additions & 1 deletion ReportInspector/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ public MainWindow() {
Close();
return;*/

WiimoteManager.AutoConnect = true;
//FIXME: AutoConnect/Unpair is broken on Windows 10, it'll cause
// more problems than solve them at this point in time.
WiimoteManager.AutoConnect = false;// true;
WiimoteManager.AutoDiscoveryCount = 1;
WiimoteManager.DolphinBarMode = true;
WiimoteManager.BluetoothMode = true;
WiimoteManager.Connected += OnWiimoteConnected;

using (FileStream stream = File.OpenRead(@"C:\Users\Onii-chan\My Projects\Dolphin\Binary\x64\Wiimote - Copy.logdat")) {
Expand Down
4 changes: 2 additions & 2 deletions ReportInspector/ReportInspector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
<Resource Include="App.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WiimoteLib\WiimoteLib.csproj">
<ProjectReference Include="..\WiimoteLib\TriggersTools.WiimoteConnect.csproj">
<Project>{37a555df-7012-4b99-8a47-1c922a361e52}</Project>
<Name>WiimoteLib</Name>
<Name>TriggersTools.WiimoteConnect</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
6 changes: 3 additions & 3 deletions WiimoteAudioPlayer/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
<xctk:SingleUpDown x:Name="spinnerVolume" Value="1" Maximum="1" Minimum="0.01" Height="24" Grid.Column="4" ValueChanged="OnVolumeChanged" Increment="0.05" DefaultValue="1" DisplayDefaultValueOnEmptyText="True" FormatString="0.000"/>
</Grid>
<Button x:Name="buttonUpdateSampleRate" Content="Update Changes" VerticalAlignment="Bottom" FontWeight="Bold" Height="28" Margin="0,5,0,0" Click="OnUpdateSettings" IsEnabled="False" IsTabStop="False" Focusable="False"/>
<Button x:Name="buttonPlayWave" Content="Play Real" VerticalAlignment="Bottom" FontWeight="Bold" Height="28" Margin="0,5,0,0" Click="OnPlayReal" IsEnabled="False" IsTabStop="False" Focusable="False"/>
<Button x:Name="buttonPlayWiimote" Content="Play Wiimote" VerticalAlignment="Bottom" FontWeight="Bold" Height="28" Margin="0,5,0,0" Click="OnPlayWiimote" IsEnabled="False" IsTabStop="False" Focusable="False"/>
<Button x:Name="buttonPlayWave" Content="Play on Computer" VerticalAlignment="Bottom" FontWeight="Bold" Height="28" Margin="0,5,0,0" Click="OnPlayReal" IsEnabled="False" IsTabStop="False" Focusable="False"/>
<Button x:Name="buttonPlayWiimote" Content="Play on Wiimote" VerticalAlignment="Bottom" FontWeight="Bold" Height="28" Margin="0,5,0,0" Click="OnPlayWiimote" IsEnabled="False" IsTabStop="False" Focusable="False"/>
<Button x:Name="buttonStop" Content="Stop Playback" VerticalAlignment="Bottom" FontWeight="Bold" Height="28" Margin="0,5,0,0" Click="OnStop" IsEnabled="False" IsTabStop="False" Focusable="False"/>
<Button x:Name="buttonLoadSound" Content="Load Sound" VerticalAlignment="Bottom" FontWeight="Bold" Height="28" Margin="0,5,0,0" Click="OnLoadSound" IsEnabled="False" IsTabStop="False" Focusable="False"/>
<Button x:Name="buttonLoadSound" Content="Load Sound" VerticalAlignment="Bottom" FontWeight="Bold" Height="28" Margin="0,5,0,0" Click="OnLoadSound" IsEnabled="True" IsTabStop="False" Focusable="False"/>
</StackPanel>
</Grid>
<Label x:Name="labelDrop" Content="Drop Sound Files Here" Grid.ColumnSpan="2" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="#88FFFFFF" Opacity="0.8" FontSize="22" FontWeight="Bold" Visibility="Collapsed"/>
Expand Down
5 changes: 4 additions & 1 deletion WiimoteAudioPlayer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ private void OnDrop(object sender, DragEventArgs e) {
}

private void OnLoaded(object sender, RoutedEventArgs e) {
WiimoteManager.AutoConnect = true;
//FIXME: AutoConnect/Unpair is broken on Windows 10, it'll cause
// more problems than solve them at this point in time.
WiimoteManager.AutoConnect = false;// true;
WiimoteManager.DolphinBarMode = true;
WiimoteManager.BluetoothMode = true;
WiimoteManager.AutoDiscoveryCount = 1;
WiimoteManager.Connected += OnWiimoteConnected;
WiimoteManager.Disconnected += OnWiimoteDisconnected;
Expand Down
4 changes: 2 additions & 2 deletions WiimoteAudioPlayer/WiimoteAudioPlayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
<Project>{a0dcbdcc-22ce-42a6-bb3a-34dbb4fc606f}</Project>
<Name>WiimoteController</Name>
</ProjectReference>
<ProjectReference Include="..\WiimoteLib\WiimoteLib.csproj">
<ProjectReference Include="..\WiimoteLib\TriggersTools.WiimoteConnect.csproj">
<Project>{37a555df-7012-4b99-8a47-1c922a361e52}</Project>
<Name>WiimoteLib</Name>
<Name>TriggersTools.WiimoteConnect</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down
Loading

0 comments on commit 79f6b6b

Please sign in to comment.