mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
added shortcuts to standard formats as static properties of ImageFormat and AudioFormat.
namely, ImageFormat.Jpeg ImageFormat.Png ImageFormat.Bmp AudioFormat.Wav
This commit is contained in:
@@ -23,7 +23,9 @@
|
||||
// IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace GameRes
|
||||
{
|
||||
@@ -167,5 +169,9 @@ namespace GameRes
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static AudioFormat Wav { get { return s_WavFormat.Value; } }
|
||||
|
||||
static readonly Lazy<AudioFormat> s_WavFormat = new Lazy<AudioFormat> (() => FormatCatalog.Instance.AudioFormats.FirstOrDefault (x => x.Tag == "WAV"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user