/// <summary> /// Initializes a new instance of <see cref="LibsndfileApi"/> with the default native implementations. /// </summary> public LibsndfileApi() { var marshaller = new LibsndfileMarshaller(); var api = new LibsndfileApiNativeWrapper(marshaller); var commandApi = new LibsndfileCommandApiNativeWrapper(api, marshaller); Initialize(api, commandApi); }
/// <summary> /// Initializes a new instance of <see cref="LibsndfileApi"/> with the given <paramref name="api"/> implementation /// and default native <see cref="ILibsndfileCommandApi"/> implementation. /// </summary> /// <param name="api">ILibsndfileApi implementation to use.</param> /// <remarks> /// This constructor should only be used for testing when simulating the actual libsndfile library. /// </remarks> internal LibsndfileApi(ILibsndfileApi api) { var commandApi = new LibsndfileCommandApiNativeWrapper(api, new LibsndfileMarshaller()); Initialize(api, commandApi); }