Fix a bug relating to changing the range of a data source.

The issue here is that the code is trying to maintain the absolute
position of the loop point. The problem with this is that the absolute
position of the loop points could fall outside the new range which
would then result in no audio being read.

This becomes an issue because it would effect data sources even when
the loop point was never actually explicitly set. From these users
perspective, changing the range completely breaks their audio.

The new system simply resets the loop points. This works for users who
are using the default loop points (the majority of cases). For those
who are explicitly setting a loop point, they simply need to reset
their loop points after changing the range. This is not really an
issue, because loop points are relative to the range, which means a
change in the range would most likely warrant a change in the loop
point anyway.
This commit is contained in:
David Reid
2022-12-24 08:05:56 +10:00
parent 49a95a326b
commit 7bd319d9ee
2 changed files with 39 additions and 38 deletions
+1
View File
@@ -5,6 +5,7 @@ v0.11.12 - TBD
* Fix a crash with some backends when rerouting the playback side of a duplex device.
* Fix some bugs with initialization of POSIX threads.
* Fix a bug where sounds are not resampled when `MA_SOUND_NO_PITCH` is used.
* Fix a bug where changing the range of a data source would result in no audio being read.
* Fix some Wimplicit-fallthrough warnings.
* Optimizations to the high level API.
* Remove the old runtime linking system for pthread. The `MA_USE_RUNTIME_LINKING_FOR_PTHREAD` option is no longer used.