nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.76k stars 7.71k forks source link

Convert stb_vorbis to a header only library [FEATURE REQUEST] #25

Open Symphonym opened 10 years ago

Symphonym commented 10 years ago

As I know stb_image was converted from a .c file library to a .h file library I just thought I'd make it known that there's interest in having stb_vorbis as a header only library as well. Simply because it makes it so much easier to incorporate into an existing C/C++ library.

Seeing how the previous issue I posted was about some minor issues I had with mixing C and C++ files in a premake project. Whilst mixing C and C++ files should work just fine, making stb_vorbis header only would make it much easier for me to use, hopefully for others as well.

hsdk123 commented 7 years ago

I also feel this would make integration a whole lot easier. Is this still being considered?

bullno1 commented 7 years ago

Except for flipping STB_VORBIS_HEADER_ONLY to STB_VORBIS_IMPLEMENTATION, what else needs to be done? Optionally static qualify all functions based on some define?

nothings commented 7 years ago

It's still something I might do someday, but I'm not making any promises that it will happen soon or ever. (Like, if I worked on stb full time I would do it pretty soon, but I don't and don't expect to over be full time on it.)

The main thing that has to be done is prefixing all global symbols with something like 'stbv_'.

BareRose commented 6 years ago

I've submitted a PR addressing this issue 12 days ago: #653

Let me know if there is anything missing, so far it works great in my own projects.

raysan5 commented 4 years ago

Any news on this issue? It would be really nice to have this library implementation aligned with the others stb_* libraries. I've been using @BareRose implementation for some time and it works great.