modules: switch to new property helpers

This commit is contained in:
Peter Hutterer 2021-10-12 14:21:11 +10:00 committed by Wim Taymans
parent 12c5a9b7ea
commit d8de1cb255
4 changed files with 7 additions and 13 deletions

View file

@ -372,10 +372,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_int32(props, PW_KEY_AUDIO_RATE, 0);
info->channels = pw_properties_get_uint32(props, PW_KEY_AUDIO_CHANNELS, 0);
if ((str = pw_properties_get(props, SPA_KEY_AUDIO_POSITION)) != NULL)
parse_position(info, str, strlen(str));
}