audioconvert: add a invalid value for scale

The invalid value here is zero, this will help avoid inadvertant parameter
updates and brings this on par with rest of the volume ramp parameters
This commit is contained in:
Ashok Sidipotu 2023-03-30 14:38:29 +05:30 committed by Wim Taymans
parent b61bf8a27d
commit dcec2e785e
4 changed files with 16 additions and 14 deletions

View file

@ -262,6 +262,7 @@ enum spa_audio_channel {
};
enum spa_audio_volume_ramp_scale {
SPA_AUDIO_VOLUME_RAMP_INVALID,
SPA_AUDIO_VOLUME_RAMP_LINEAR,
SPA_AUDIO_VOLUME_RAMP_CUBIC,
};

View file

@ -48,6 +48,7 @@ static const struct spa_type_info spa_type_props[] = {
{ SPA_PROP_volumeRampStepSamples, SPA_TYPE_Int, SPA_TYPE_INFO_PROPS_BASE "volumeRampStepSamples", NULL },
{ SPA_PROP_volumeRampTime, SPA_TYPE_Int, SPA_TYPE_INFO_PROPS_BASE "volumeRampTime", NULL },
{ SPA_PROP_volumeRampStepTime, SPA_TYPE_Int, SPA_TYPE_INFO_PROPS_BASE "volumeRampStepTime", NULL },
{ SPA_PROP_volumeRampScale, SPA_TYPE_Id, SPA_TYPE_INFO_PROPS_BASE "volumeRampScale", NULL },
{ SPA_PROP_mute, SPA_TYPE_Bool, SPA_TYPE_INFO_PROPS_BASE "mute", NULL },
{ SPA_PROP_patternType, SPA_TYPE_Id, SPA_TYPE_INFO_PROPS_BASE "patternType", NULL },
{ SPA_PROP_ditherType, SPA_TYPE_Id, SPA_TYPE_INFO_PROPS_BASE "ditherType", NULL },

View file

@ -60,11 +60,6 @@ enum spa_prop {
SPA_PROP_waveType,
SPA_PROP_frequency,
SPA_PROP_volume, /**< a volume (Float), 0.0 silence, 1.0 normal */
SPA_PROP_volumeRampSamples, /**< Samples to ramp the volume over */
SPA_PROP_volumeRampStepSamples, /**< Step or incremental Samples to ramp the volume over */
SPA_PROP_volumeRampTime, /**< Time in millisec to ramp the volume over */
SPA_PROP_volumeRampStepTime, /**< Step or incremental Time in nano seconds to ramp the */
SPA_PROP_volumeRampScale, /**< the scale or graph to used to ramp the volume */
SPA_PROP_mute, /**< mute (Bool) */
SPA_PROP_patternType,
SPA_PROP_ditherType,
@ -95,6 +90,11 @@ enum spa_prop {
SPA_PROP_exposure,
SPA_PROP_gain,
SPA_PROP_sharpness,
SPA_PROP_volumeRampSamples, /**< Samples to ramp the volume over */
SPA_PROP_volumeRampStepSamples, /**< Step or incremental Samples to ramp the volume over */
SPA_PROP_volumeRampTime, /**< Time in millisec to ramp the volume over */
SPA_PROP_volumeRampStepTime, /**< Step or incremental Time in nano seconds to ramp the */
SPA_PROP_volumeRampScale, /**< the scale or graph to used to ramp the volume */
SPA_PROP_START_Other = 0x80000, /**< other properties */
SPA_PROP_params, /**< simple control params