summaryrefslogtreecommitdiff
path: root/.gitattributes
diff options
context:
space:
mode:
authorhungrymonkey <boringmonkey@gmail.com>2017-10-08 15:11:29 -0700
committerhungrymonkey <boringmonkey@gmail.com>2017-10-09 11:34:28 -0700
commit5080a9cf2110bc3903ae11d14b379d88b1cf8991 (patch)
tree8ffc4e5b28a7b6aee56ff05bc88a28414132dcfe /.gitattributes
parentc95ba4d7a75c7431c0339c17e7b81e32ce6f6483 (diff)
Fix data alignment issues in get_data() in AudioStreamSample
I am fixing the issue by adding DATA_PAD to the return pointer as suggested by hi-ogawa When using set_data in AudioStreamSample in PoolByteArray, the data is set using a DATA_PAD to pad the pointer to the correct place as such uint8_t *dataptr = (uint8_t *)data; copymem(dataptr + DATA_PAD, r.ptr(), datalen); data_bytes = datalen; godot/scene/resources/audio_stream_sample.cpp#L473 All I am doing is adding a DATA_PAD to the return pointer to get_data() in AudioStreamSample to change godot/scene/resources/audio_stream_sample.cpp#L48 PoolVector<uint8_t>::Write w = pv.write(); copymem(w.ptr(), data, data_bytes); to PoolVector<uint8_t>::Write w = pv.write(); uint8_t *dataptr = (uint8_t *)data; copymem(w.ptr(), dataptr + DATA_PAD, data_bytes); Please review whether or not set or get is correct. Because this issue seems to be fixable by removing DATA_PAD in set_data() instead of adding DATA_PAD to get_data(). I have not tested the latter fix Fixes #issue, 11873
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions