Skip to content

Commit

Permalink
Fix audio instances
Browse files Browse the repository at this point in the history
Fixes issue reported here: https://2dimensions.slack.com/archives/CSFM8K3CH/p1713795412798999

Part of the problem here was that the audio clips were never getting their "end" callback called as miniaudio doesn't call the "end" callback when an end time is provided that is not the end of the actual audio file. I modified the AudioEngine to create an appropriately sized PCM buffer for buffered sources and wrap the decoder in an audio source that only decodes the necessary PCM frames before marking the file is actually at its end (based on desired end frame). This is the cleanest way to make miniaudio call the callback without modifying the miniaudio source itself.

Diffs=
2b2e92ca7 Fix audio instances (#7113)
  • Loading branch information
luigi-rosso committed Apr 23, 2024
1 parent 38f4ba0 commit 8d4a1a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14ea38786d50c49c23753ff9f5df349c012fb298
2b2e92ca7ef815c7c60176c14bed4bd488d44d0c
2 changes: 1 addition & 1 deletion .rive_renderer
Original file line number Diff line number Diff line change
@@ -1 +1 @@
938f5040166c949ae45d991b837b46eab3137ead
5ba7d6b3a4bde15fef4c8d4beba0368d63d15ac4
2 changes: 1 addition & 1 deletion submodules/rive-cpp

0 comments on commit 8d4a1a0

Please sign in to comment.