frontend: Add audio properties to GetClientConfiguration request

This commit is contained in:
Ruwen Hahn
2024-08-15 16:53:34 +02:00
committed by Ryan Foster
parent c67ea47406
commit 9e3d0eb31b
2 changed files with 15 additions and 1 deletions

View File

@@ -61,6 +61,14 @@ GoLiveApi::PostData constructGoLivePost(QString streamKey, const std::optional<u
preferences.composition_gpu_index = ovi.adapter;
}
obs_audio_info2 oai2;
if (obs_get_audio_info2(&oai2)) {
preferences.audio_samples_per_sec = oai2.samples_per_sec;
preferences.audio_channels = get_audio_channels(oai2.speakers);
preferences.audio_fixed_buffering = oai2.fixed_buffering;
preferences.audio_max_buffering_ms = oai2.max_buffering_ms;
}
if (maximum_aggregate_bitrate.has_value())
preferences.maximum_aggregate_bitrate = maximum_aggregate_bitrate.value();
if (maximum_video_tracks.has_value())

View File

@@ -144,9 +144,15 @@ struct Preferences {
uint32_t canvas_width;
uint32_t canvas_height;
optional<uint32_t> composition_gpu_index;
uint32_t audio_samples_per_sec;
uint32_t audio_channels;
uint32_t audio_max_buffering_ms;
bool audio_fixed_buffering;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(Preferences, maximum_aggregate_bitrate, maximum_video_tracks, vod_track_audio,
width, height, framerate, canvas_width, canvas_height, composition_gpu_index)
width, height, framerate, canvas_width, canvas_height, composition_gpu_index,
audio_samples_per_sec, audio_channels, audio_max_buffering_ms,
audio_fixed_buffering)
};
struct PostData {