Lines Matching defs:volume
38 static void calc_linear_integer_volume(int32_t linear[], const pa_cvolume *volume) {
42 pa_assert(volume);
44 nchannels = volume->channels;
47 linear[channel] = (int32_t) lrint(pa_sw_volume_to_linear(volume->values[channel]) * 0x10000);
53 static void calc_linear_float_volume(float linear[], const pa_cvolume *volume) {
57 pa_assert(volume);
59 nchannels = volume->channels;
62 linear[channel] = (float) pa_sw_volume_to_linear(volume->values[channel]);
68 static void calc_linear_integer_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec) {
74 pa_assert(volume);
76 calc_linear_float_volume(linear, volume);
82 m->linear[channel].i = (int32_t) lrint(pa_sw_volume_to_linear(m->volume.values[channel]) * linear[channel] * 0x10000);
87 static void calc_linear_float_stream_volumes(pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec) {
93 pa_assert(volume);
95 calc_linear_float_volume(linear, volume);
101 m->linear[channel].f = (float) (pa_sw_volume_to_linear(m->volume.values[channel]) * linear[channel]);
106 typedef void (*pa_calc_stream_volumes_func_t) (pa_mix_info streams[], unsigned nstreams, const pa_cvolume *volume, const pa_sample_spec *spec);
621 const pa_cvolume *volume,
633 if (!volume)
634 volume = pa_cvolume_reset(&full_volume, spec->channels);
636 if (mute || pa_cvolume_is_muted(volume)) {
646 calc_stream_volumes_table[spec->format](streams, nstreams, volume, spec);
672 typedef void (*pa_calc_volume_func_t) (void *volumes, const pa_cvolume *volume);
693 const pa_cvolume *volume) {
703 pa_assert(volume);
708 if (pa_cvolume_is_norm(volume))
711 if (pa_cvolume_is_muted(volume)) {
719 calc_volume_table[spec->format] ((void *)linear, volume);