Ok so I started using the windows Core Audios APIs and learned how to read its documentation. Currently I’ve created only 1 function that enumerates all available devices and lists them in console logs. In addition to using the windows API, I also connected my C++ files to JS. While doing this I ran into a number of errors which took up majority of the time. So the errors were:
- The include for napi.h in my cpp file that acted as my bridge didn’t work so to fix it I added a json file in the .vscode file that had paths for the napi file which ended up working. Though it seems like a simple fix I was searching for a file in my computer that didn’t exist. I was expecting there to be a node-gyp folder in my appdata folder but there wasn’t so I looked in other spots and tryed finding roundabout methods but then I found a command that allowed me to easily get that node-gyp folder where I needed it to be.
- The other problem was that I kept getting an error when trying to build through node-gyp. I didn’t feel like reading the console output so I just put it into AI which kept giving me wrong answers. Eventually I decided to read it myself and found that the AI I was using was targeting the wrong file path and my node-gyp folder in appdata that I created earlier was missing some files. So lesson learned: read the console before asking AI so it doesn’t waste my time 😭
Now after getting all this done I went to run my code and then ran into another error and I don’t feel like looking into that right now so I’m just gonna do that later.