How to Implement Simply in C#? #796
Unanswered
BattouSaeen
asked this question in
Q&A
Replies: 2 comments 1 reply
|
This repository doesn't do anything with C# so you probably won't get many answers here. I for one don't have any real experience with .Net bindings so can't help you much. But the way I understand it is that you would compile a native DLL and then link to that DLL through .Net. Every public function in miniaudio is decorated with #define MA_API __declspec(dllexport) <or whatever you need to set it to>
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio.h"As for the C# side, I can't help you much there. I believe there are some C# bindings out there that you might be able to use as a reference. |
0 replies
|
If you are anyone else is still looking for a .net wrapper check my repository https://github.com/japajoe/MiniAudioExNET |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey guys, I'm fairly noob, especially with a C library this big.
Normally in C++ you'd just #include a library and call its functions.
In C# I've seen one has to declare ext something in the C library so that it can be used in C#. Is that right? And any good way to put it so it doesn't seem so daunting?
I was originally planning to create it in C++ but considering how complicated it is to do good GUIs in C++ (for my level), I decided to fall back to frameworks already established like Avalonia, which is in C# and XAML.
If it's just putting export labels in the library on functions I need, okay not a big deal but when I look at the examples and library there's a lot of pointer stuff, handling memory and all that ... not sure how to deal with that.
Thanks!
All reactions