MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / MxSetMusicSource

Function MxSetMusicSource

src/mixer.cpp:234–239  ·  view source on GitHub ↗

* Set source of PCM music * @param music_callback Function that will be called to fill sample buffers with music data. * @return Sample rate of mixer, which the buffers supplied to the callback must be rendered at. */

Source from the content-addressed store, hash-verified

232 * @return Sample rate of mixer, which the buffers supplied to the callback must be rendered at.
233 */
234uint32_t MxSetMusicSource(MxStreamCallback music_callback)
235{
236 std::lock_guard<std::mutex> lock{ _music_stream_mutex };
237 _music_stream = music_callback;
238 return _play_rate;
239}
240
241
242bool MxInitialize(uint rate)

Callers 2

StartMethod · 0.85
StopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected