[scripting help] Can I get audio data in a lua script?

Rosiedilly

New Member
This may be a bit out of scope for lua scripts, but figured it'd be best to ask before giving up on using lua
I'm wanting to make a visualizer source of sorts, that reacts to audio from an audio source
But I don't how to get the audio_data struct from a source, I can find the source I want and access it, but don't know how to get to the audio data from there
I could see from a C++ visualizer source I looked at the code of, that it used "obs_source_add_audio_capture_callback" to get the data, but that unsurprisingly did not work in lua (it complained about the callback function being of type function instead of type obs_source_audio_capture_t)
I was just curious if anyone more experienced with specifically using lua with obs might have an idea of how to accomplish this?
Or if you'd know if it is out of scope of lua scripting and I should bite the bullet and try learning more of C++ to try and put together this source plugin
 
Top