Create audio capture source crashed.

Allen ZHU

New Member
I want to create an 'audio input capture' source. When I call ' obs_source_create', it crashed.
My source code below. Thanks for your help!

// init obs ok!
if ( !obs_startup( "en-US", nullptr, nullptr ) ) {
throw "init obs failed!";
}

// reset video ok!
if ( !resetVideo() ) {
throw "reset obs video failed!";
}

// reset audio ok!
if ( !resetAudio() ) {
throw "reset obs audio failed!";
}

obs_load_all_modules();
obs_post_load_modules();

// create 'Video Capture Device' source ok!
obs_source_t *source0 = obs_source_create( " dshow_input", " Video Capture Device", nullptr, nullptr );

// create 'Audio Input Capture' source crashed!
obs_source_t *source1 = obs_source_create( "wasapi_input_capture", "Audio Input Capture", nullptr, nullptr );
 
Top