gen2brain / raylib-go

Go bindings for raylib, a simple and easy-to-use library to enjoy videogames programming.
zlib License
1.6k stars 164 forks source link

Request to add ExportWaveAsCode #402

Open sandy-30 opened 3 months ago

sandy-30 commented 3 months ago

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.

gen2brain commented 3 months ago

But that export C code, what is the use of C code in Go bindings?

sandy-30 commented 3 months ago

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.

gen2brain commented 3 months ago

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.