modules: switch more modules to the new property helpers

This commit is contained in:
Peter Hutterer 2021-10-12 14:57:47 +10:00 committed by Wim Taymans
parent c59ede837d
commit 32fb369b66
8 changed files with 18 additions and 34 deletions

View file

@ -795,10 +795,8 @@ static void parse_audio_info(struct pw_properties *props, struct spa_audio_info_
*info = SPA_AUDIO_INFO_RAW_INIT(
.format = SPA_AUDIO_FORMAT_F32P);
if ((str = pw_properties_get(props, PW_KEY_AUDIO_RATE)) != NULL)
info->rate = atoi(str);
if ((str = pw_properties_get(props, PW_KEY_AUDIO_CHANNELS)) != NULL)
info->channels = atoi(str);
info->rate = pw_properties_get_uint32(props, PW_KEY_AUDIO_RATE, info->rate);
info->channels = pw_properties_get_uint32(props, PW_KEY_AUDIO_CHANNELS, info->channels);
if ((str = pw_properties_get(props, SPA_KEY_AUDIO_POSITION)) != NULL)
parse_position(info, str, strlen(str));
}