Hi friends, I have an AudioStreamSample with stereo data. How can I convert it to mono? This will reduce the size by half, I think.
Welcome to the forums!
In the import tab on the Godot Editor, I believe there is an option to convert audio to mono. From what I remember, it is near the bottom of the import settings for audio files.
Hello TwistedTwigleg !
Thanks for your help! But this is not quite for me. I need to convert throughout the gameplay.
I already wrote a small function for this:
var old_data = stream.get_data()
var new_data = range(old_data.size() / 2)
if stream.format == stream.FORMAT_16_BITS:
for i in new_data.size() / 2:
new_data[i * 2] = (old_data[i * 4] + old_data[i * 4 + 2]) / 2.0
new_data[i * 2+1] = (old_data[i * 4 + 1] + old_data[i * 4 + 3])/2.0
for i in new_data.size():
new_data[i] = (old_data[i * 2] + old_data[i * 2 + 1]) / 2.0
stream.data = new_data
stream.stereo = false
It works great.
Rich Text Editor.
To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph.
An inline formatting menu will show up when you select text. Hit tab to get into that menu.
Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.