// if it's both, we haven't decided whether hw or sw should be on top
// we have to consider the settings ignore_volume_control and mute.
- if (config.ignore_volume_control == 0) {
if (airplay_volume == -144.0) {
if ((config.output->mute) && (config.output->mute(1) == 0))
debug(1, "player_volume_without_notification: error: not in a volume mode");
break;
}
- double scaled_attenuation = 0.0;
- if (config.volume_control_profile == VCP_standard)
- scaled_attenuation = vol2attn(airplay_volume, max_db, min_db); // no cancellation points
- else if (config.volume_control_profile == VCP_flat)
- scaled_attenuation =
- flat_vol2attn(airplay_volume, max_db, min_db); // no cancellation points
- else
- debug(1, "player_volume_without_notification: unrecognised volume control profile");
+ double scaled_attenuation = max_db;
+ if (config.ignore_volume_control == 0) {
+ if (config.volume_control_profile == VCP_standard)
+ scaled_attenuation = vol2attn(airplay_volume, max_db, min_db); // no cancellation points
+ else if (config.volume_control_profile == VCP_flat)
+ scaled_attenuation =
+ flat_vol2attn(airplay_volume, max_db, min_db); // no cancellation points
+ else
+ debug(1, "player_volume_without_notification: unrecognised volume control profile");
+ }
// so here we have the scaled attenuation. If it's for hw or sw only, it's straightforward.
double hardware_attenuation = 0.0;
if ((volume_mode == vol_sw_only) || (volume_mode == vol_both)) {
double temp_fix_volume = 65536.0 * pow(10, software_attenuation / 2000);
- // debug(1,"Software attenuation set to %f, i.e %f out of 65,536, for airplay volume of
- // %f",software_attenuation,temp_fix_volume,airplay_volume);
+ if (config.ignore_volume_control == 0)
+ debug(2,"Software attenuation set to %f, i.e %f out of 65,536, for airplay volume of %f",software_attenuation,temp_fix_volume,airplay_volume);
+ else
+ debug(2,"Software attenuation set to %f, i.e %f out of 65,536. Volume control is ignored.",software_attenuation,temp_fix_volume);
conn->fix_volume = temp_fix_volume;
"is disabled.",
volume_mode, airplay_volume, software_attenuation, hardware_attenuation);
}
+
+ /*
}
#ifdef CONFIG_METADATA
send_ssnc_metadata('pvol', dv, strlen(dv), 1);
}
#endif
+*/
// here, store the volume for possible use in the future
config.airplay_volume = airplay_volume;