Skip to content

Commit 37ae68c

Browse files
committed
Add stopAllAudio
1 parent 25e3f2b commit 37ae68c

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .engine,
3-
.version = "0.15.2",
3+
.version = "0.15.3",
44
.fingerprint = 0xe8a81a8d0aa558d5,
55
.minimum_zig_version = "0.16.0",
66
.dependencies = .{

src/engine.zig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,14 @@ pub fn Display(comptime T: type) type {
10741074
);
10751075
}
10761076

1077+
/// Load an image from a specific resource bundle.
1078+
pub fn stopAllAudio(
1079+
self: *Self,
1080+
fade_out_ms: i64,
1081+
) (Error || Allocator.Error)!void {
1082+
_ = mixer.MIX_StopAllTracks(self.mix, fade_out_ms);
1083+
}
1084+
10771085
/// Load an image from a specific resource bundle.
10781086
pub fn playBundleResource(
10791087
self: *Self,

0 commit comments

Comments
 (0)