Interface ISegment<TSource>
Represents a range of audio from a source object. SEGMENTS ARE NOT HIERARCHICAL CONSTRUCTS.
Inherited Members
Namespace: AnalysisBase.Segment
Assembly: AnalysisBase.dll
Syntax
public interface ISegment<TSource> : IEquatable<ISegment<TSource>>
Type Parameters
| Name | Description |
|---|---|
| TSource | The type of source file used. |
Properties
| Improve this Doc View SourceEndOffsetSeconds
Gets the end of the segment, represented by seconds from the start of the audio object.
Declaration
double EndOffsetSeconds { get; }
Property Value
| Type | Description |
|---|---|
| Double |
Source
Gets the source audio object.
TSource will be a path or FileInfo for local sources.
For remote sources, TSource could be an arbitrary object.
The ISource
Declaration
TSource Source { get; }
Property Value
| Type | Description |
|---|---|
| TSource |
SourceMetadata
Gets information about the source.
Declaration
SourceMetadata SourceMetadata { get; }
Property Value
| Type | Description |
|---|---|
| Source |
StartOffsetSeconds
Gets the start of the segment, represented by seconds from the start of the audio object.
Declaration
double StartOffsetSeconds { get; }
Property Value
| Type | Description |
|---|---|
| Double |
Methods
| Improve this Doc View SourceSplitSegment(Double, Double)
Allows for the creation of a new segment, keeping the original source but changing the offsets.
Declaration
ISegment<TSource> SplitSegment(double newStart, double newEnd)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | newStart | The new start offset to use for this segment. |
| Double | newEnd | The new end offset to use for this segment. |
Returns
| Type | Description |
|---|---|
| ISegment<TSource> | A segment from the same source, with new offsets. |