| 95 | } |
| 96 | |
| 97 | std::unique_ptr<SDLAudioSource> CreateMemoryAudioSource( |
| 98 | const AudioFormat& target, const AudioFormat& src, std::vector<uint8_t>&& pcmData) |
| 99 | { |
| 100 | if (!ConvertPcmData(target, src, pcmData)) |
| 101 | throw std::runtime_error("Unable to convert PCM data to target format"); |
| 102 | |
| 103 | return std::make_unique<MemoryAudioSource>(target, std::move(pcmData)); |
| 104 | } |
| 105 | } // namespace OpenRCT2::Audio |
no test coverage detected