mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Implement IAudioSource.Duration property and IAudioDecoderSettings.Open extension method.
This commit is contained in:
@@ -127,6 +127,11 @@ namespace TTA {
|
||||
}
|
||||
}
|
||||
|
||||
virtual property TimeSpan Duration {
|
||||
TimeSpan get() {
|
||||
return Length < 0 ? TimeSpan::Zero : TimeSpan::FromSeconds((double)Length / PCM->SampleRate);
|
||||
}
|
||||
}
|
||||
virtual property Int64 Length {
|
||||
Int64 get() {
|
||||
return _sampleCount;
|
||||
|
||||
Reference in New Issue
Block a user