fix wasm32-freestanding builds

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-03-04 23:46:25 -07:00 committed by Stephen Gutekanst
parent f29b775b27
commit 55317a1afc
2 changed files with 62 additions and 59 deletions

View file

@ -51,7 +51,7 @@ pub const Context = struct {
pub fn refresh(ctx: *Context) !void {
for (ctx.devices_info.list.items) |d|
freeDevice(ctx.allocator, d);
ctx.devices_info.clear(ctx.allocator);
ctx.devices_info.clear();
try ctx.devices_info.list.append(ctx.allocator, default_playback);
ctx.devices_info.list.items[0].channels = try ctx.allocator.alloc(main.ChannelPosition, 2);