mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-12 09:16:10 -04:00
frontend: Add audio properties to GetClientConfiguration request
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user