diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-11 22:30:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 22:30:13 +0200 |
commit | 98718ecd63476352f0a6299b2af2dd046ed9d5e3 (patch) | |
tree | 63766a7ed118c799c273f11ab7dabd1f851bed0e | |
parent | 490722c34fb520b16d3f43a8cc352d124babfc75 (diff) | |
parent | 5080a9cf2110bc3903ae11d14b379d88b1cf8991 (diff) |
Merge pull request #11951 from hungrymonkey/fix_issue11873
fix issue 11873. AudioStreamSample get_data() seems to be misaligned.
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index 1fd84a860e..fdc3b79db6 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -486,7 +486,8 @@ PoolVector<uint8_t> AudioStreamSample::get_data() const { { PoolVector<uint8_t>::Write w = pv.write(); - copymem(w.ptr(), data, data_bytes); + uint8_t *dataptr = (uint8_t *)data; + copymem(w.ptr(), dataptr + DATA_PAD, data_bytes); } } |