I know not everyone has used the PortAudio API, but maybe you can find it in here anyway.
#include <iostream>
#include <math.h>
#include "portaudio.h"
int main() {
PaDeviceIndex outputDevice;
PaDeviceIndex deviceCount;
outputDevice = Pa_GetDefaultOutputDevice();
deviceCount = Pa_GetDeviceCount();
const PaDeviceInfo * outputDeviceInfo;
outputDeviceInfo = Pa_GetDeviceInfo(outputDevice);
std::cout << "Name of default output device: " << outputDeviceInfo->name << std::endl;
std::cout << "Struct version: " << outputDeviceInfo->structVersion << std::endl;
return 0;
}
*EDIT: * sorry guys, I didn’t know there even was a debugger. I wasn’t trying to be rude or inconsiderate. It said it’s caused by line 12 and 13, the ones that begin with std::cout. I don’t see what the problem is.
Null pointer dereference.
Pa_GetDeviceInfois returning a null pointer.