| 455 | throw std::runtime_error("convert_audio step failed: " + id); |
| 456 | } |
| 457 | context.values[id + ".audio_path"] = output.string(); |
| 458 | std::cout << "workflow_step=" << id << "\n"; |
| 459 | std::cout << "audio_path=" << output.string() << "\n"; |
| 460 | } |
| 461 | |
| 462 | void write_runtime_audio( |
| 463 | const std::filesystem::path & path, |
| 464 | const engine::runtime::AudioBuffer & audio) { |
| 465 | if (!path.parent_path().empty()) { |
| 466 | std::filesystem::create_directories(path.parent_path()); |
| 467 | } |
| 468 | engine::audio::WavPcm16Sink().write(path, engine::audio::AudioBuffer{ |
| 469 | audio.sample_rate, |
| 470 | audio.channels, |
| 471 | audio.samples, |
no test coverage detected