libobs/audio-monitoring: Move variable assignment

Assinged too early for upcoming change that may reset monitor->render.
master
jpark37 2021-10-01 21:45:50 -07:00 committed by Jim
parent 7af886581d
commit eb6050f3ce
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,6 @@ static void on_audio_playback(void *param, obs_source_t *source,
const struct audio_data *audio_data, bool muted)
{
struct audio_monitor *monitor = param;
IAudioRenderClient *render = monitor->render;
uint8_t *resample_data[MAX_AV_PLANES];
float vol = source->user_volume;
uint32_t resample_frames;
@ -318,6 +317,7 @@ static void on_audio_playback(void *param, obs_source_t *source,
}
}
IAudioRenderClient *const render = monitor->render;
HRESULT hr =
render->lpVtbl->GetBuffer(render, resample_frames, &output);
if (FAILED(hr)) {