Bloom.Publish.EpubMaker.MakeCompressedAudio C# (CSharp) Method

MakeCompressedAudio() private method

Make a compressed audio file for the specified .wav file. (Or return null if it can't be done becaus we don't have a LAME package installed.)
private MakeCompressedAudio ( string wavPath ) : string
wavPath string
return string
        internal virtual string MakeCompressedAudio(string wavPath)
        {
            // We have a recording, but not compressed. Possibly the LAME package was installed after
            // the recordings were made. Compress it now.
            if (_mp3Encoder == null)
            {
                if (!LameEncoder.IsAvailable())
                {
                    return null;
                }
                _mp3Encoder = new LameEncoder();
            }
            _mp3Encoder.Encode(wavPath, wavPath.Substring(0, wavPath.Length - 4), new NullProgress());
            return Path.ChangeExtension(wavPath, "mp3");
        }