summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/hrtf.zig3
-rw-r--r--examples/play.zig5
2 files changed, 5 insertions, 3 deletions
diff --git a/examples/hrtf.zig b/examples/hrtf.zig
index d90adff..2db3d78 100644
--- a/examples/hrtf.zig
+++ b/examples/hrtf.zig
@@ -56,7 +56,8 @@ pub fn main() !void {
     const source = try Source.init();
     defer source.deinit() catch unreachable;
     try source.setSpatialize(al.TRUE);
-    try source.play(buffer);
+    try source.bind(buffer);
+    try source.play();
     defer print("\n", .{});
     while (try source.isPlaying()) {
         const offset = try source.getSecOffset();
diff --git a/examples/play.zig b/examples/play.zig
index 2ad1db9..210972c 100644
--- a/examples/play.zig
+++ b/examples/play.zig
@@ -49,10 +49,11 @@ pub fn main() !void {
 
     const source = try Source.init();
     defer source.deinit() catch unreachable;
-    try source.play(buffer);
+    try source.bind(buffer);
+    try source.play();
     defer print("\n", .{});
     while (try source.isPlaying()) {
         sleep(10_000_000);
-        defer print("\r{d:.1} s", .{ source.getSecOffset() });
+        print("\r{d:.1} s", .{ source.getSecOffset() });
     }
 }