private void ApplyControllerMapping(string filePath) { using (var fileStream = new FileStream(filePath, FileMode.Open)) { NKSFRiff n = new NKSFRiff(); n.Read(fileStream); DefaultControllerAssignments = n.kontaktSound.controllerAssignments.controllerAssignments; } GenerateControllerMappingModels(); }
private void OnParseNKSFFileExecute() { Log.Debug("Trying to parse NKSF"); using (var fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) { NKSFRiff n = new NKSFRiff(); n.Read(fileStream); SummaryInformation = FormatJson(n.kontaktSound.summaryInformation.getJSON()); PluginId = FormatJson(n.kontaktSound.pluginId.getJSON()); ControllerAssignments = FormatJson(n.kontaktSound.controllerAssignments.getJSON()); var ms = new MemoryStream(); ms.Write(n.kontaktSound.pluginChunk.Chunk, 0, n.kontaktSound.pluginChunk.Chunk.Length); PluginChunk = ms; PluginChunkHash = HashUtils.getIxxHash(n.kontaktSound.pluginChunk.Chunk); } Log.Debug("Parse Complete"); }