
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+
#+     Internet Radio Automation & Encoding Toolkit
#+
#+     Copyright (C) 2018, 2019, 2020, 2021 2022 by Kevin C. O'Kane
#+
#+     Kevin C. O'Kane
#+     kc.okane@gmail.com
#+     https://www.cs.uni.edu/~okane
#+     https://threadsafebooks.com/
#+
#+ This program is free software; you can redistribute it and/or modify
#+ it under the terms of the GNU General Public License as published by
#+ the Free Software Foundation; either version 2 of the License, or
#+ (at your option) any later version.
#+
#+ This program is distributed in the hope that it will be useful,
#+ but WITHOUT ANY WARRANTY; without even the implied warranty of
#+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#+ GNU General Public License for more details.
#+
#+ You should have received a copy of the GNU General Public License
#+ along with this program; if not, write to the Free Software
#+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#+
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

//	Oct 8, 2022

#include "common-externs.h"

//-----------------------------------------------------------
//	microphone amplification level output signal (format)
//-----------------------------------------------------------

void on_micThreshold1_value_changed (GtkSpinButton *r) {


	return;

	char text[16];

	pa_cvolume vol = {2, 65000, 65000}; // tw channels

	if (no_microphone) {
		gtk_range_set_value (GTK_RANGE(r), 10.);
		return;
		}

	mic_volume = gtk_spin_button_get_value (r);

//	mic_volume = (int) gtk_range_get_value(r);

	vol.values[0] = (mic_volume / 100.0) * 65535;
	vol.values[1] = (mic_volume / 100.0) * 65535;
	vol.channels = source_channels;

	if (context_source) { // Mcontext pointer must be non-zero
		pa_operation *x  = pa_context_set_source_volume_by_name
		                   (context_source, default_source, &vol, NULL, NULL);
		}

//	mic_volume = gtk_range_get_value (r);
//	sprintf(text, "%.0f%%", mic_volume);
//	gtk_label_set_text(GTK_LABEL(micGain), text); // overwrites default title
	return;
	}

