Maintain static DataFormatReference and initialize brand new one to avoid clashing with base RIFF DataFormat
This commit is contained in:
parent
d4ad46574b
commit
2e3ce57185
@ -13,14 +13,17 @@ namespace UniversalEditor.DataFormats.Multimedia.Audio.Waveform.MicrosoftWave
|
||||
{
|
||||
public class MicrosoftWaveDataFormat : RIFFDataFormat
|
||||
{
|
||||
private static DataFormatReference _dfr = null;
|
||||
public override DataFormatReference MakeReference()
|
||||
{
|
||||
DataFormatReference dfr = base.MakeReference();
|
||||
dfr.Title = "Microsoft waveform audio";
|
||||
dfr.Filters.Add("Microsoft waveform audio", new byte?[][] { new byte?[] { (byte)'R', (byte)'I', (byte)'F', (byte)'F', null, null, null, null, (byte)'W', (byte)'A', (byte)'V', (byte)'E', (byte)'f', (byte)'m', (byte)'t', (byte)' ' } }, new string[] { "*.wav", "*.wave" });
|
||||
dfr.Filters.Add("Sony ATRAC3+ encoded waveform audio", new string[] { "*.at3" });
|
||||
dfr.Capabilities.Add(typeof(WaveformAudioObjectModel), DataFormatCapabilities.All);
|
||||
return dfr;
|
||||
if (_dfr == null)
|
||||
{
|
||||
_dfr = new DataFormatReference(GetType());
|
||||
_dfr.Filters.Add("Microsoft waveform audio", new byte?[][] { new byte?[] { (byte)'R', (byte)'I', (byte)'F', (byte)'F', null, null, null, null, (byte)'W', (byte)'A', (byte)'V', (byte)'E', (byte)'f', (byte)'m', (byte)'t', (byte)' ' } }, new string[] { "*.wav", "*.wave" });
|
||||
_dfr.Filters.Add("Sony ATRAC3+ encoded waveform audio", new string[] { "*.at3" });
|
||||
_dfr.Capabilities.Add(typeof(WaveformAudioObjectModel), DataFormatCapabilities.All);
|
||||
}
|
||||
return _dfr;
|
||||
}
|
||||
|
||||
// TODO: Test IsObjectModelSupported!!!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user