Interface ISourcePreparer
Interface for preparing source files.
Namespace: AnalysisBase
Assembly: AnalysisBase.dll
Syntax
public interface ISourcePreparer
Methods
| Improve this Doc View SourceCalculateSegments<TSource>(IEnumerable<ISegment<TSource>>, AnalysisSettings)
Calculate the file segments for analysis.
Declaration
IEnumerable<ISegment<TSource>> CalculateSegments<TSource>(IEnumerable<ISegment<TSource>> fileSegments, AnalysisSettings settings)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ISegment<TSource>> | fileSegments | The file segments. |
AnalysisSettings | settings | The settings. |
Returns
Type | Description |
---|---|
IEnumerable<ISegment<TSource>> | Enumerable of file segments. |
Type Parameters
Name | Description |
---|---|
TSource |
Remarks
This API does not fit with the other two. We should consider factoring it out.
PrepareFile(DirectoryInfo, String, String, TimeSpan, TimeSpan, Int32)
Prepare an audio file. This will be a single segment of a larger audio file, modified based on the analysisSettings.
Declaration
Task<FileSegment> PrepareFile(DirectoryInfo outputDirectory, string source, string outputMediaType, TimeSpan startOffset, TimeSpan endOffset, int targetSampleRateHz)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | outputDirectory | The analysis Base Directory. |
String | source | The source audio file. |
String | outputMediaType | The output Media Type. |
TimeSpan | startOffset | The start Offset from start of entire original file. |
TimeSpan | endOffset | The end Offset from start of entire original file. |
Int32 | targetSampleRateHz | The target Sample Rate Hz. |
Returns
Type | Description |
---|---|
Task<FileSegment> | The prepared file. |
PrepareFile<TSource>(DirectoryInfo, ISegment<TSource>, String, Nullable<Int32>, DirectoryInfo, Int32[], Nullable<Boolean>)
Prepare an audio file. This will be a single segment of a larger audio file, modified based on the analysisSettings.
Declaration
Task<FileSegment> PrepareFile<TSource>(DirectoryInfo outputDirectory, ISegment<TSource> source, string outputMediaType, int? targetSampleRateHz, DirectoryInfo temporaryFilesDirectory, int[] channelSelection, bool? mixDownToMono)
Parameters
Type | Name | Description |
---|---|---|
DirectoryInfo | outputDirectory | The analysis Base Directory. |
ISegment<TSource> | source | The source audio file. |
String | outputMediaType | The output Media Type. |
Nullable<Int32> | targetSampleRateHz | The target Sample Rate Hz. |
DirectoryInfo | temporaryFilesDirectory | The directory for temporary files. |
Int32[] | channelSelection | |
Nullable<Boolean> | mixDownToMono |
Returns
Type | Description |
---|---|
Task<FileSegment> | The prepared file. |
Type Parameters
Name | Description |
---|---|
TSource |