Open tpimh opened 3 months ago
Hi @tpimh, sorry for the late response. As of the moment it does not support recording audio.
One possible solution is to use another thread and so it's non-blocking with the main thread and let that thread handle recording like using the OpenAL for example, then post-process (I guess?) to sync the two.
I forgot what we have discussed regarding this way before @MikuAuahDark
Quote from a recent discussion with @MikuAuahDark:
I don't think there's much options for this unfortunately. Few possible ways:
- Using OpenAL loopback device. Upside, you get raw PCM samples which you may able to supply to SDL2 audio mixer to play it back. Downside, doing it in LOVE requires function pointer trampoline (doable with FFI) which is very hacky and may trip security measurement in modern processors or antiviruses.
- Using
wave
backend in OpenAL-soft. Upside, you just get WAV file. Downside, you can't pass it to SDL2 audio mixer which means no audio from your game.- Recent OBS "Game Capture" has option to capture only the game audio. Upside: It works. Downside: 3rd party, Windows only.
LÖVE provides API to capture the graphics after the frame is rendered, but is there a way to capture the audio after it's mixed?
I can't find such API in LÖVE, so maybe it's worth looking into OpenAL API? Possibly, the audio that the game plays can additionally be exposed as a RecordingDevice?