MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / playMusic

Method playMusic

Source/LevelDebugLayer.cpp:92–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void LevelDebugLayer::playMusic(float dt)
93{
94 #if (TARGET_PLATFORM == AX_PLATFORM_WIN32)
95 char appdata[256];
96 GetFolderLocation(CSIDL_LOCAL_APPDATA, appdata);
97 auto path = fmt::format("{}/GeometryDash/{}.mp3", appdata, songid);
98 audioId = AudioEngine::play2d(path, true, 0.2f);
99 scheduleOnce([&](float dt) { AudioEngine::setCurrentTime(audioId, offset); }, 1, "time");
100 #endif
101}
102
103bool LevelDebugLayer::init(GJGameLevel* level)
104{

Callers

nothing calls this directly

Calls 1

GetFolderLocationFunction · 0.85

Tested by

no test coverage detected