Skip to content

Commit

Permalink
Reach Release Candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
axynos committed Oct 6, 2016
1 parent eecb869 commit a5bae90
Show file tree
Hide file tree
Showing 21 changed files with 105 additions and 28 deletions.
Binary file modified .vs/STARK/v14/.suo
Binary file not shown.
3 changes: 0 additions & 3 deletions STARK/AudioFileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.ObjectModel;
using System.IO;
using System.Text.RegularExpressions;
using System.Windows;

namespace STARK {
public class AudioFileManager : IDisposable{
Expand Down Expand Up @@ -53,8 +52,6 @@ public void ChangeWatchFolder(string watchFolder) {
this.watchFolder = watchFolder;
watcher.Path = this.watchFolder;

MessageBox.Show(this.watchFolder);

ClearCollection();
LoadCurrentFiles();
directoryExists = true;
Expand Down
5 changes: 2 additions & 3 deletions STARK/AudioPlaybackItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
using System.Collections.ObjectModel;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows;


namespace STARK {
public class AudioPlaybackItem {
Expand Down Expand Up @@ -49,7 +48,7 @@ public string GetPath() {
private AudioFileManager getAFM() {
AudioFileManager afm = null;
App.Current.Dispatcher.Invoke(delegate {
afm = (Application.Current.MainWindow as MainWindow).getAFM();
afm = (App.Current.MainWindow as MainWindow).getAFM();
});

if (afm == null) return null;
Expand Down
4 changes: 4 additions & 0 deletions STARK/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ public string getCommand() {
public string[] getSplitter() {
return splitter;
}

public string getSplitterAsString() {
return splitter[0];
}
}
}
7 changes: 2 additions & 5 deletions STARK/CommandReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.IO;
using System.Text;
using System.Timers;
using System.Windows;

namespace STARK {
class CommandReader : IDisposable{
Expand Down Expand Up @@ -38,11 +37,10 @@ public CommandReader(ref QueuedSpeechSynthesizer qss, ref AudioPlaybackEngine ap
resumeCmd = CommandManager.resumeCmd;
stopCmd = CommandManager.stopCmd;

StartReadLoop();
Setup(logFile);
StartReadLoop();
}


private void parseCommand(string line) {
if (line != "") {
if (ContainsCommand(line, synthCmd)) {
Expand Down Expand Up @@ -92,15 +90,14 @@ private void StartReadLoop() {
private void Setup(string path) {
//makes a file if there is none
if (!File.Exists(path)) File.CreateText(path).Close();
//var fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
var bufferedStream = new BufferedStream(File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
reader = new StreamReader(bufferedStream);
//skips the lines that are in the file on load so we don't get historic commands
reader.ReadToEnd();
}

private bool ContainsCommand(string line, Command command) {
if (line.Contains(command.getCommand())) return true;
if (line.Contains(command.getSplitterAsString())) return true;
else return false;
}

Expand Down
8 changes: 4 additions & 4 deletions STARK/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@
<ListView.View>
<GridView AllowsColumnReorder="False">
<GridViewColumn Header="ID" Width="35" DisplayMemberBinding="{Binding id}"/>
<GridViewColumn Header="DEF" Width="40" DisplayMemberBinding="{Binding isDefault}"/>
<GridViewColumn Header="TRACK" Width="150" DisplayMemberBinding="{Binding name}"/>
<GridViewColumn Header="BIND" Width="50" DisplayMemberBinding="{Binding name}"/>
<GridViewColumn Header="TAGS" Width="180" DisplayMemberBinding="{Binding displayTags, UpdateSourceTrigger=PropertyChanged}"/>
<!--<GridViewColumn Header="DEF" Width="40" DisplayMemberBinding="{Binding isDefault}"/>-->
<GridViewColumn Header="TRACK" Width="220" DisplayMemberBinding="{Binding name}"/>
<!--<GridViewColumn Header="BIND" Width="50" DisplayMemberBinding="{Binding name}"/>-->
<GridViewColumn Header="TAGS" Width="200" DisplayMemberBinding="{Binding displayTags, UpdateSourceTrigger=PropertyChanged}"/>
</GridView>
</ListView.View>
</ListView>
Expand Down
38 changes: 29 additions & 9 deletions STARK/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public MainWindow() {
changeCombinedOutput(Setup_OutputCombined.SelectedIndex);
changeLoopbackOutput(Setup_SynthesizerOnly.SelectedIndex);


FindSteamApps();

loaded = true;
Expand Down Expand Up @@ -147,7 +146,7 @@ public void saveSettings() {
settings.Loopback_Volume = (int) Audio_LoopbackVolumeSlider.Value;

settings.Setup_Microphone_SelectedIndex = Setup_Microphone.SelectedIndex;
settings.Setup_Standard_Output_SelectedIndex = Setup_SynthesizerOnly.SelectedIndex;
settings.Setup_Loopback_Output_SelectedIndex = Setup_SynthesizerOnly.SelectedIndex;
settings.Setup_Standard_Output_SelectedIndex = Setup_OutputCombined.SelectedIndex;

settings.Setup_SteamApps_Folder = PathManager.steamApps;
Expand Down Expand Up @@ -177,7 +176,7 @@ public void loadSettings() {
Audio_LoopbackVolumeTextBox.Text = "" + settings.Loopback_Volume;

Setup_Microphone.SelectedIndex = settings.Setup_Microphone_SelectedIndex;
Setup_SynthesizerOnly.SelectedIndex = settings.Setup_Standard_Output_SelectedIndex;
Setup_SynthesizerOnly.SelectedIndex = settings.Setup_Loopback_Output_SelectedIndex;
Setup_OutputCombined.SelectedIndex = settings.Setup_Standard_Output_SelectedIndex;

PathManager.steamApps = settings.Setup_SteamApps_Folder;
Expand Down Expand Up @@ -663,13 +662,34 @@ public void Dispose() {
}

protected virtual void Dispose(bool disposing) {
if (qss != null) qss.Dispose();
if (afm != null) afm.Dispose();
if (ape != null) ape.Dispose();
if (qss != null) {
qss.Dispose();
qss = null;
}
if (afm != null) {
afm.Dispose();
afm = null;
}
if (ape != null) {
ape.Dispose(); //rip Harambe
ape = null;
}
if (wiMicrophone != null) {
wiMicrophone.StopRecording();
wiMicrophone.Dispose();
wiMicrophone = null;
}
if (woLoopback != null) {
woLoopback.Stop();
woLoopback.Dispose();
woLoopback = null;
}
if (woStandard != null) {
woStandard.Stop();
woStandard.Dispose();
woStandard = null;
}

qss = null;
afm = null;
ape = null;
}
#endregion
}
Expand Down
Binary file modified STARK/bin/Debug/STARK.exe
Binary file not shown.
Binary file modified STARK/bin/Debug/STARK.pdb
Binary file not shown.
Binary file modified STARK/bin/Release/STARK.exe
Binary file not shown.
Binary file modified STARK/bin/Release/STARK.pdb
Binary file not shown.
Binary file modified STARK/obj/Debug/STARK.exe
Binary file not shown.
Binary file modified STARK/obj/Debug/STARK.pdb
Binary file not shown.
62 changes: 61 additions & 1 deletion STARK/obj/Release/GeneratedInternalTypeHelper.g.cs
Original file line number Diff line number Diff line change
@@ -1,2 +1,62 @@

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace XamlGeneratedNamespace {


/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {

/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}

/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}

/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}

/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}

/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

Binary file modified STARK/obj/Release/MainWindow.baml
Binary file not shown.
2 changes: 1 addition & 1 deletion STARK/obj/Release/MainWindow.g.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "A0E54F4CDDBD8D025F2A4AE0EEC2C593"
#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E81FFA8E9152EFA619D156525E644200"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
Expand Down
2 changes: 1 addition & 1 deletion STARK/obj/Release/MainWindow.g.i.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "A0E54F4CDDBD8D025F2A4AE0EEC2C593"
#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E81FFA8E9152EFA619D156525E644200"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
Expand Down
Binary file modified STARK/obj/Release/STARK.exe
Binary file not shown.
Binary file modified STARK/obj/Release/STARK.g.resources
Binary file not shown.
Binary file modified STARK/obj/Release/STARK.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion STARK/obj/Release/STARK_MarkupCompile.lref
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
F:\_Development\_Desktop\_Visual Studio\STARK\STARK\obj\Release\GeneratedInternalTypeHelper.g.cs

FF:\_Development\_Desktop\_Visual Studio\STARK\STARK\App.xaml;;
FF:\_Development\_Desktop\_Visual Studio\STARK\STARK\MainWindow.xaml;;

0 comments on commit a5bae90

Please sign in to comment.