namespace E7.Native { public static partial class NativeAudio { /// /// An option for . /// Because it is a `struct`, start making it from to get a good default values. /// public struct LoadOptions { /// /// A good starting values to create custom options. A `struct` cannot have default value on `new`. /// public static readonly LoadOptions defaultOptions = new LoadOptions { resamplingQuality = ResamplingQuality.SINC_FASTEST, }; /// /// Determines what resampling quality for [Secret Rabbit Code](http://www.mega-nerd.com/SRC/) to use. /// public enum ResamplingQuality { //SINC_BEST_QUALITY = 0, //SINC_MEDIUM_QUALITY = 1, /// /// Use a coefficients from sinc wave for reconstruction. Takes a bit of time to complete. /// /// /// Some benchmark : Resampling a WAV file of about 2MB (this is quite big) from 44.1kHz /// to 48kHz freezes the screen for 0.4 seconds on an Xperia Z5. /// (See https://ccrma.stanford.edu/~jos/resample/) /// SINC_FASTEST = 2, /// /// Just use the previous value for any missing data. /// It is the fastest resampling method but might sounds poor. /// ZERO_ORDER_HOLD = 3, /// /// The missing value will be linearly interpolated. /// Faster than sinc resampling. /// LINEAR = 4, }; /// /// The quality which `libsamplerate` will use to resample your audio to match the device's native rate. /// Default to on /// /// /// Two top quality setting has been removed from the source code since the sinc wave constant coefficients /// are needed and could potentially make Native Audio sized at 0.79MB (For medium quality) or 9.2MB (For best quality) /// /// If you really need it, you can uncomment and then go modify back the source and recompile with the missing coefficients. /// public ResamplingQuality resamplingQuality; } } }