godotengine / godotengine/godot-docs

Add documentation on how to convert AudioEffectCapture into usable audio/ how to use get_buffer_frames

Open
#8,326 1 comment 0 reactions 0 assignees View on GitHub
area:manual enhancement
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

### Describe the project you are working on

A game that relies on passing audio

### Describe the problem or limitation you are having in your project

I am trying to capture audio in Godot.

Godot provides an "AudioEffectCapture" effect, with a method "get_buffer()", that allows you to get the audiosamples

However, there is a lack of documentation on how to use this data.

> Application code should consume these audio frames from this ring buffer using get_buffer() and process it as needed, for example to capture data from an AudioStreamMicrophone, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM.

There is a lot of "what", but not a lot of "how".
For instance,is it possible to convert this PoolVector2Array into a usable poolbytearray? How does one turn the audio frames into usable game audio? To users with little experience with the technicalities, it doesn't seem particularly helpful.

Upon searching google, r/Godot, Youtube, there is no documentation on how to actually "use" the audioeffectcapture, or what to do with the PoolVector2Array.

Audioeffectrecord is a thing, but I would like to use audioeffectcapture if possible, as it seems to grant a little more control.

### Describe the feature / enhancement and how it helps to overcome the problem or limitation

Slightly better documentation would be more helpful to the user

### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

There should be documentation underneath the get_buffer() method that provides a short example on how to actually use the audioframesamples, or if possible, how to convert the samples into a usable form ie PoolByteArray...

### If this enhancement will not be used often, can it be worked around with a few lines of script?

No

### Is there a reason why this should be core and not an add-on in the asset library?

User experience

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.