Skip to content

Clipboard and sound

sdk.clipboard.getText and setText can stall, so they refuse the render thread. Call them from a task or a worker.

try sdk.clipboard.setText(io, "0x1234");
const text = try sdk.clipboard.getText(io, allocator);
defer allocator.free(text);

WAV files and Windows’ own sounds. One plays at a time, so a new one stops the last, and nothing plays while the user has Sounds off in Wraith’s settings. Any thread, even the render thread, except playFile, which reads the file.

const ding = @embedFile("ding.wav");
try sdk.sound.play(ding);
sdk.sound.playSystem(.notification);
sdk.sound.stop();
// In a task, it reads on a worker
try sdk.sound.playFile(io, allocator, "C:/sounds/ding.wav");

Made with ♥ by Asgard