mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 15:24:07 +00:00
libobs/audio-monitoring: Move variable assignment
Assinged too early for upcoming change that may reset monitor->render.
This commit is contained in:
parent
7af886581d
commit
eb6050f3ce
|
@ -280,7 +280,6 @@ static void on_audio_playback(void *param, obs_source_t *source,
|
||||||
const struct audio_data *audio_data, bool muted)
|
const struct audio_data *audio_data, bool muted)
|
||||||
{
|
{
|
||||||
struct audio_monitor *monitor = param;
|
struct audio_monitor *monitor = param;
|
||||||
IAudioRenderClient *render = monitor->render;
|
|
||||||
uint8_t *resample_data[MAX_AV_PLANES];
|
uint8_t *resample_data[MAX_AV_PLANES];
|
||||||
float vol = source->user_volume;
|
float vol = source->user_volume;
|
||||||
uint32_t resample_frames;
|
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 =
|
HRESULT hr =
|
||||||
render->lpVtbl->GetBuffer(render, resample_frames, &output);
|
render->lpVtbl->GetBuffer(render, resample_frames, &output);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
|
|
Loading…
Reference in a new issue