summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/alc.zig4
-rw-r--r--src/main.zig6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/alc.zig b/src/alc.zig
index 3a6d9a8..68e12b3 100644
--- a/src/alc.zig
+++ b/src/alc.zig
@@ -73,8 +73,8 @@ pub fn getContextsDevice(context: *Context) !*Device {
 }
 
 /// Open the named playback device.
-pub fn openDevice(devicename: [*c]const u8) !*Device {
-    if (alcOpenDevice(devicename)) |device|
+pub fn openDevice(device_name: [*c]const u8) !*Device {
+    if (alcOpenDevice(device_name)) |device|
         return device;
     return switch (alcGetError(null)) {
         ALC_INVALID_VALUE => Error.InvalidValue,
diff --git a/src/main.zig b/src/main.zig
index 159ab24..add48ae 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -18,8 +18,8 @@
 
 const alc = @import("alc.zig");
 
-pub fn init() !void {
-    const device = try alc.openDevice(null);
+pub fn init(device_name: [*c]const u8) !void {
+    const device = try alc.openDevice(device_name);
     const context = try alc.createContext(device, null);
     try alc.makeContextCurrent(context);
 }
@@ -33,6 +33,6 @@ pub fn deinit() !void {
 }
 
 test {
-    try init();
+    try init(null);
     try deinit();
 }