-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
236 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Cavern.Format.Common { | ||
/// <summary> | ||
/// Interface for a format that can be exported to a file. | ||
/// </summary> | ||
public interface IExportable { | ||
/// <summary> | ||
/// Extension of the main file created with <see cref="Export(string)"/>. If multiple files are created, this is the extension of | ||
/// the root file. This should be displayed on export dialogs. | ||
/// </summary> | ||
public string FileExtension { get; } | ||
|
||
/// <summary> | ||
/// Export this object to a target file. | ||
/// </summary> | ||
/// <param name="path">Location of the target file</param> | ||
public void Export(string path); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Cavern.QuickEQ.Format/ConfigurationFile/ConvolutionBoxFormat.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Cavern.Channels; | ||
using Cavern.Filters.Utilities; | ||
|
||
namespace Cavern.Format.ConfigurationFile { | ||
/// <summary> | ||
/// A file format only supporting matrix mixing and convolution filters. | ||
/// </summary> | ||
public sealed class ConvolutionBoxFormat : ConfigurationFile { | ||
/// <inheritdoc/> | ||
public override string FileExtension => ".cbf"; | ||
|
||
/// <summary> | ||
/// Convert an<paramref name="other"/> configuration file to Convolution Box Format. | ||
/// </summary> | ||
public ConvolutionBoxFormat(ConfigurationFile other) : base(other) { } | ||
|
||
/// <summary> | ||
/// Create an empty file for a custom layout. | ||
/// </summary> | ||
public ConvolutionBoxFormat(string name, ReferenceChannel[] inputs) : base(name, inputs) => FinishEmpty(inputs); | ||
|
||
/// <inheritdoc/> | ||
public override void Export(string path) { | ||
(FilterGraphNode node, int channel)[] exportOrder = GetExportOrder(); | ||
// TODO: file format definition to repo | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.