sysaudio: update to latest Zig version
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
334c6085a0
commit
ed7c180f26
1 changed files with 4 additions and 4 deletions
|
|
@ -277,7 +277,7 @@ pub const Context = struct {
|
||||||
}
|
}
|
||||||
defer win32.CoTaskMemFree(id_u16);
|
defer win32.CoTaskMemFree(id_u16);
|
||||||
|
|
||||||
break :blk std.unicode.utf16leToUtf8AllocZ(ctx.allocator, std.mem.span(id_u16.?)) catch |err| switch (err) {
|
break :blk std.unicode.utf16LeToUtf8AllocZ(ctx.allocator, std.mem.span(id_u16.?)) catch |err| switch (err) {
|
||||||
error.OutOfMemory => return error.OutOfMemory,
|
error.OutOfMemory => return error.OutOfMemory,
|
||||||
else => return error.OpeningDevice,
|
else => return error.OpeningDevice,
|
||||||
};
|
};
|
||||||
|
|
@ -291,7 +291,7 @@ pub const Context = struct {
|
||||||
}
|
}
|
||||||
defer win32.CoTaskMemFree(variant.anon.anon.anon.pwszVal);
|
defer win32.CoTaskMemFree(variant.anon.anon.anon.pwszVal);
|
||||||
|
|
||||||
break :blk std.unicode.utf16leToUtf8AllocZ(
|
break :blk std.unicode.utf16LeToUtf8AllocZ(
|
||||||
ctx.allocator,
|
ctx.allocator,
|
||||||
std.mem.span(variant.anon.anon.anon.pwszVal.?),
|
std.mem.span(variant.anon.anon.anon.pwszVal.?),
|
||||||
) catch |err| switch (err) {
|
) catch |err| switch (err) {
|
||||||
|
|
@ -411,7 +411,7 @@ pub const Context = struct {
|
||||||
else => return error.OpeningDevice,
|
else => return error.OpeningDevice,
|
||||||
}
|
}
|
||||||
|
|
||||||
return std.unicode.utf16leToUtf8AllocZ(ctx.allocator, std.mem.span(default_playback_id_u16.?)) catch |err| switch (err) {
|
return std.unicode.utf16LeToUtf8AllocZ(ctx.allocator, std.mem.span(default_playback_id_u16.?)) catch |err| switch (err) {
|
||||||
error.OutOfMemory => return error.OutOfMemory,
|
error.OutOfMemory => return error.OutOfMemory,
|
||||||
else => return error.OpeningDevice,
|
else => return error.OpeningDevice,
|
||||||
};
|
};
|
||||||
|
|
@ -427,7 +427,7 @@ pub const Context = struct {
|
||||||
audio_client3: *?*win32.IAudioClient3,
|
audio_client3: *?*win32.IAudioClient3,
|
||||||
max_buffer_frames: *u32,
|
max_buffer_frames: *u32,
|
||||||
) !void {
|
) !void {
|
||||||
const id_u16 = std.unicode.utf8ToUtf16LeWithNull(ctx.allocator, device.id) catch |err| switch (err) {
|
const id_u16 = std.unicode.utf8ToUtf16LeAllocZ(ctx.allocator, device.id) catch |err| switch (err) {
|
||||||
error.OutOfMemory => return error.OutOfMemory,
|
error.OutOfMemory => return error.OutOfMemory,
|
||||||
else => unreachable,
|
else => unreachable,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue