Open sandy-30 opened 3 months ago
But that export C code, what is the use of C code in Go bindings?
In my usecase it's for tooling, my game is in cpp, but I am planning to have some external tool support that ai my dev workflow. Maily to inport sound files (in any format), convert them to wave with ffmepg (ffmpeg-go module) and generate hederfiles for he same.
There will be some more slicing and dicing of audio files, with in the tool. I don't want to get into it's nitty gritties.
I don't like the idea of adding just that one function, if I am to accept this (which I prefer not to) then all AsCode
functions should be added, of course for both cgo and purego. As that function is not so complicated you can replicate that in your code, I guess you would need a data
member of the Wave
struct to be exported, you can send a PR for that instead.
Raylib has an API to export wave as array data
ExportWaveAsCode
.With go bindings we can use it for tooling. I can raise a PR if required.