Recent

Author Topic: Recording Mic on MacOS Bass.dll  (Read 926 times)

axisdj

  • Jr. Member
  • **
  • Posts: 64
Recording Mic on MacOS Bass.dll
« on: May 23, 2020, 04:44:06 pm »
Hello Group,

I need some guidance. I have my app working in Windows(i can select mic device and input (master) and record to file), but when I move to macOS my Bass_RecordGetInputName does not return any input names.

The mic shows connected in System Preferences / Sound / Input and shows level

For testing purposes I have tried:

Bass_RecordInit(-1) or (0) with success
Bass_RecordSetDevice(0) or (-1) with success
but
Bass_RecordSetinput filas with error code 20 no matter what I try, which makes sense because there are no input name found.

I am very new to MAC development, is there some kind of magic setting that may be blocking MIC permissions? Any guidance on this would be much appreciated.

I have posted this on the bass.dll forum as well, but hoping for some insight on the MACos side here?

Thanks!

axisdj

  • Jr. Member
  • **
  • Posts: 64
Re: Recording Mic on MacOS Bass.dll
« Reply #1 on: May 25, 2020, 07:26:35 pm »
Ok...

I got it working.

Please correct me if I am wrong but here is what I discovered.

On MACos the app needs to run in the app bundle. In the plist file of that bundle microphone access needs to be specified. then when the app runs a dialog will appear to allow mic access.

For testing I just placed my resource files and app bundle on desktop, need to figure out how to get resource folder path using code, so I can place all resources in proper place on MacOS.

Boy, is macOS annoyingly structured or what. (from pc guy of 20 years)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Recording Mic on MacOS Bass.dll
« Reply #2 on: May 26, 2020, 03:01:46 am »
If by "app needs to run in the app bundle" you mean a bass.dylib dynamic library (cf dll in Windows), then the dynamic library file should be stored in the bundle's Frameworks directory. See the Wiki artcile on  [https://wiki.lazarus.freepascal.org/Application_Bundle]Application Bindles[/ur].

For testing I just placed my resource files and app bundle on desktop, need to figure out how to get resource folder path using code, so I can place all resources in proper place on MacOS.

See the Wiki article [https://wiki.lazarus.freepascal.org/Locating_the_macOS_application_resources_directory]Locating the macOS application resources directory]. However, if you mean locating your dylib in the the Frameworks directory, see the Wiki article on macOS Dynamic Libraries paying attention the the install_name_tool.

There's a lot of macOS-specific information to be found in the Wiki's Mac Portal.

Quote
Boy, is macOS annoyingly structured or what. (from pc guy of 20 years)

macOS has never suffered from DLL hell... Good, different ;)

 

TinyPortal © 2005-2018