✅ Bass Library Error: Device(Illegal Device Number)
I am having hard time with using the bass library on MacOS. I am not able to get rid of the Device(Illegal Device Number) issue after publishing. It works perfectly in debug mode. After publishing for microsoft windows too, it is having problem but I am not sure about that. But I am sure about the MacOS problem.
11 Replies
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
So yeah, I have this method that records audio:
But on the line here
Bass.RecordInit();
it is returning false and when I try to check the last error it is device error which translates as illegal device number.
I am using the ManagedBass library and you have to download the dll from the offical website or some projects on github.
Basically, it works on development both on windows and mac. But it doesn't work after publishing on both platforms but they are different problems.
Illegal device number error is from MacOSCould it be it's not finding any (enabled) devices?
it is weird because, how will this not be an issue on development mode
by development mode, I mean running the code directly from src
I'm not sure tbh, have you tried to just run something simple to get the list of available devices to double check?
Yes. There is a property for that in the library and it returns 6
morethan enough tbh
have you tried specifying a device rather than letting it choose the default?
Yeah.
Bass.RecordInit();
means use defaultI know, I'm saying have you tried specifying a different device (if you have some other mic input) to see if that works?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.