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:
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using System.IO;
|
||||
|
||||
namespace CUETools.Codecs
|
||||
{
|
||||
@@ -44,5 +45,10 @@ namespace CUETools.Codecs
|
||||
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(settings))
|
||||
property.ResetValue(settings);
|
||||
}
|
||||
|
||||
public static IAudioSource Open(this IAudioDecoderSettings settings, string path, Stream IO = null)
|
||||
{
|
||||
return Activator.CreateInstance(settings.DecoderType, settings, path, IO) as IAudioSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user