Heirloom icon indicating copy to clipboard operation
Heirloom copied to clipboard

Consider changing access modifier for Heirloom.MiniAudio

Open asrulhadi opened this issue 2 years ago • 7 comments

Hi,

Would you consider changing Heirloom.MiniAudio from internal class es to public class?

This will give access for other project to used it, independently from Heirloom framework.

asrulhadi avatar Jan 05 '23 02:01 asrulhadi

It's a bit more complicated than a simple binding for MA. I had to write my own C layer to adapt the structs because MA (at least at the time of writing it) would have a different context struct depending on the platform it was compiled for. So I wrote a wrapper in C to allocate and expose only the parts I needed to C#.

I could consider revisiting and maybe rewriting a new C# bindings if that's what you're hoping for. Would be a lot of work, but if there isn't one available yet it might be worth it.

Chamberlain91 avatar Jan 05 '23 04:01 Chamberlain91

Currently I am looking for a portable audio player for my project. Need basic requirement. Just need to play sound file. Modifying your code with appropriate access level could complete the job.

Would you mine if I fork your repo and use for my project?

asrulhadi avatar Jan 05 '23 08:01 asrulhadi

It should be able to already play mp3 or ogg files with my abstraction. Why do you need the lower level MA functions?

Chamberlain91 avatar Jan 05 '23 08:01 Chamberlain91

https://github.com/Chamberlain91/Heirloom/tree/develop/Examples/Heirloom.Examples.PlayMusic

Chamberlain91 avatar Jan 05 '23 08:01 Chamberlain91

So, you have abstracted it in the development branch. I am just looking into the master branch. My Bad.

Looking into the code, it should be sufficient for my needs.

asrulhadi avatar Jan 05 '23 09:01 asrulhadi

Awesome. Keep me up to date. I am quite interested that someone found this project

Chamberlain91 avatar Jan 05 '23 09:01 Chamberlain91

A plan to publish nuget?

asrulhadi avatar Jan 05 '23 09:01 asrulhadi