/// <summary> /// Imports a DAISY 3 book in Obi /// </summary> /// <param name="outputPath"></param> /// <param name="title"></param> /// <param name="createTitleSection"></param> /// <param name="id"></param> /// <param name="settings"></param> /// <param name="importDTBPath"></param> public void ImportProjectFromDTB(string outputPath, string title, bool createTitleSection, string id, Settings settings, string importDTBPath, ref ImportExport.DAISY3_ObiImport import, int audioChannels, int audioSampleRate) { importDTBPath = System.IO.Path.GetFullPath(importDTBPath); CreateNewPresentationInBackend(outputPath, title, createTitleSection, id, settings, true, audioChannels, audioSampleRate); import = new Obi.ImportExport.DAISY3_ObiImport(this, settings, importDTBPath, System.IO.Path.GetDirectoryName(outputPath), false, audioSampleRate == 44100? AudioLib.SampleRate.Hz44100: audioSampleRate == 22050? AudioLib.SampleRate.Hz22050: AudioLib.SampleRate.Hz11025, audioChannels == 2); import.DoWork(); if (import.RequestCancellation) { mProject = null; return; } Presentation.CheckAndCreateDefaultMetadataItems(settings.UserProfile); import.CorrectExternalAudioMedia(); Save(Path); if (ProjectCreated != null) { ProjectCreated(this, null); } }