MCPcopy Create free account
hub / github.com/bbc/audiowaveform / convertAudioFormat

Method convertAudioFormat

src/OptionHandler.cpp:186–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184//------------------------------------------------------------------------------
185
186bool OptionHandler::convertAudioFormat(
187 const boost::filesystem::path& input_filename,
188 const FileFormat::FileFormat input_format,
189 const boost::filesystem::path& output_filename,
190 const Options& options
191 )
192{
193 std::unique_ptr<AudioFileReader> reader(
194 createAudioFileReader(input_filename, input_format, options)
195 );
196
197 if (!reader->open(input_filename.string().c_str())) {
198 return false;
199 }
200
201 WavFileWriter writer(output_filename.string().c_str());
202
203 return reader->run(writer);
204}
205
206//------------------------------------------------------------------------------
207

Callers

nothing calls this directly

Calls 3

createAudioFileReaderFunction · 0.85
openMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected