BloomTests.Publish.ExportEpubTests.MakeFakeAudio C# (CSharp) Method

MakeFakeAudio() protected method

protected MakeFakeAudio ( string path ) : void
path string
return void
        protected void MakeFakeAudio(string path)
        {
            lock (s_thisLock)
            {
                Directory.CreateDirectory(Path.GetDirectoryName(path));
                // Bloom is going to try to figure its duration, so put a real audio file there.
                // Some of the paths are for mp4s, but it doesn't hurt to use an mp3.
                var src = SIL.IO.FileLocator.GetFileDistributedWithApplication("src/BloomTests/Publish/sample_audio.mp3");
                File.Copy(src, path);
                var wavSrc = Path.ChangeExtension(src, ".wav");
                File.Copy(wavSrc, Path.ChangeExtension(path, "wav"), true);
            }
        }