Files
reasampler/src/shell/capture/track_guid.cpp
T

25 lines
759 B
C++

// track_guid.cpp — the single MediaTrack* -> canonical GUID key formatter. See
// track_guid.h. Compiled into the reaper_reasampler module; includes
// reaper_plugin_functions.h WITHOUT REAPERAPI_IMPLEMENT (main.cpp is the one TU
// that defines the API pointers).
#include "shell/capture/track_guid.h"
#define REAPERAPI_MINIMAL
#define REAPERAPI_WANT_GetTrackGUID
#define REAPERAPI_WANT_guidToString
#include "reaper_plugin_functions.h"
namespace reasampler {
std::string guidString(MediaTrack* tr) {
if (!tr) return {};
GUID* g = GetTrackGUID(tr);
if (!g) return {};
char buf[64] = {0}; // guidToString needs a >=64-char destination (SDK contract)
guidToString(g, buf);
return std::string(buf);
}
} // namespace reasampler