5080a9cf21
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 |
||
---|---|---|
.. | ||
2d | ||
3d | ||
animation | ||
audio | ||
gui | ||
main | ||
resources | ||
register_scene_types.cpp | ||
register_scene_types.h | ||
scene_string_names.cpp | ||
scene_string_names.h | ||
SCsub |