Skip to content

Commit

Permalink
Extract interface from Channel class #2
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriiKh committed Aug 31, 2020
1 parent 10bcf7b commit 2386340
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CarefulAudioRepair/Data/Channel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace CarefulAudioRepair.Data
/// <summary>
/// Represents audio samples for one channel.
/// </summary>
internal class Channel : IDisposable
internal class Channel : IDisposable, IChannel
{
private ScannerTools scannerTools;

Expand Down
24 changes: 24 additions & 0 deletions CarefulAudioRepair/Data/IChannel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// <copyright file="Channel.cs" company="Dmitrii Khrustalev">
// Copyright (c) Dmitrii Khrustalev. All rights reserved.
// </copyright>

using System;
using System.Threading.Tasks;

namespace CarefulAudioRepair.Data
{
internal interface IChannel
{
bool IsPreprocessed { get; }
int LengthSamples { get; }
int NumberOfPatches { get; }

void Dispose();
Patch[] GetAllPatches();
double[] GetInputRange(int start, int length);
double GetInputSample(int position);
double GetOutputSample(int position);
double GetPredictionErr(int position);
Task ScanAsync(IProgress<string> status, IProgress<double> progress);
}
}

0 comments on commit 2386340

Please sign in to comment.