MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / CreateMemoryAudioSource

Function CreateMemoryAudioSource

src/openrct2-ui/audio/MemoryAudioSource.cpp:97–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

ToMemoryMethod · 0.85
CreateAudioSourceMethod · 0.85

Calls 1

ConvertPcmDataFunction · 0.85

Tested by

no test coverage detected