How to Implement Simply in C#? #796
Unanswered
BattouSaeen
asked this question in
Q&A
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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!
Beta Was this translation helpful? Give feedback.
All reactions