<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Lautstärke von HWAVEIN rausfinden]]></title><description><![CDATA[<p>Hallo!<br />
Ich benutze den folgenden Code um die Lautstärke des benutzten HWAVEINs herauszufinden..einmal hab ichs nach waveInOpen und einmal nach waveInStart probiert...hab auch anstatt dem HWAVEIN als Handle schon den Mixer verwendet...am weitesten kommt er mit der folgenden Konstellation...der Fehler ist bei mixerGetControlDetails MMSYSERROR_INVALIDPARAM...vielleicht schafft ihr es ja die MSDN besser zu interpretieren als ich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":\"
      alt="😕"
    /></p>
<pre><code class="language-cpp">rc = mixerOpen(&amp;hMixer, (UINT)m_currentOb-&gt;waveIn.m_hWaveIn,0,0,MIXER_OBJECTF_HWAVEIN);
			if (MMSYSERR_NOERROR != rc) {
				return;
			}

			ZeroMemory(&amp;mxl,sizeof(mxl));
			mxl.cbStruct = sizeof(mxl);

			//mxl.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_WAVEIN;

			rc = mixerGetLineInfo((HMIXEROBJ)m_currentOb-&gt;waveIn.m_hWaveIn, &amp;mxl,
                           MIXER_OBJECTF_HWAVEIN);

			if(rc != MMSYSERR_NOERROR)
				return;

			ZeroMemory(&amp;mxlc, sizeof(mxlc));
			mxlc.cbStruct = sizeof(mxlc);
			mxlc.dwLineID = mxl.dwLineID;
			mxlc.dwControlType = MIXERCONTROL_CONTROLTYPE_PEAKMETER;
			mxlc.cControls = 1;
			mxlc.cbmxctrl = sizeof(mxc);
			mxlc.pamxctrl = &amp;mxc;
			ZeroMemory(&amp;mxc, sizeof(mxc));
			mxc.cbStruct = sizeof(mxc);
			//MIXER_GETLINECONTROLSF_ONEBYTYPE
			rc = mixerGetLineControls((HMIXEROBJ)m_currentOb-&gt;waveIn.m_hWaveIn,&amp;mxlc,
									   MIXER_OBJECTF_HWAVEIN);

			if(rc != MMSYSERR_NOERROR)
				return;

			MIXERCONTROLDETAILS mxcd;             // Gets the control values.
			MIXERCONTROLDETAILS_SIGNED volStruct; // Gets the control values.
			long volume;                          // Holds the final volume value.

			// Initialize the MIXERCONTROLDETAILS structure
			ZeroMemory(&amp;mxcd, sizeof(mxcd));
			mxcd.cbStruct = sizeof(mxcd);
			mxcd.cbDetails = sizeof(volStruct);
			mxcd.dwControlID = mxc.dwControlID;
			mxcd.paDetails = &amp;volStruct;
			mxcd.cChannels = 1;

			// Get the current value of the peakmeter control. Typically, you
			// would set a timer in your program to query the volume every 10th
			// of a second or so.

			//MIXER_GETCONTROLDETAILSF_VALUE
			rc = mixerGetControlDetails((HMIXEROBJ)m_currentOb-&gt;waveIn.m_hWaveIn, &amp;mxcd,
									 MIXER_OBJECTF_HWAVEIN);
		/*	rc = mixerGetControlDetails((HMIXEROBJ)hMixer, &amp;mxcd,
										 MIXER_GETCONTROLDETAILSF_VALUE);*/

			if (MMSYSERR_NOERROR != rc) {
				return;
			}
			volume = volStruct.lValue;

			// Get the absolute value of the volume.
			if (volume &lt; 0)
				volume = -volume;

			m_ctrlPeakMeter.SetMeterBands(1, mxc.Bounds.lMaximum);
			int iArray[1];
			iArray[0] = volume;
			m_ctrlPeakMeter.SetData(iArray, 0, 1);

			mixerClose(hMixer);
</code></pre>
<p>Danke</p>
<p>Kevin</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/71886/lautstärke-von-hwavein-rausfinden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 21:59:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/71886.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Apr 2004 19:04:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Lautstärke von HWAVEIN rausfinden on Thu, 22 Apr 2004 19:04:08 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich benutze den folgenden Code um die Lautstärke des benutzten HWAVEINs herauszufinden..einmal hab ichs nach waveInOpen und einmal nach waveInStart probiert...hab auch anstatt dem HWAVEIN als Handle schon den Mixer verwendet...am weitesten kommt er mit der folgenden Konstellation...der Fehler ist bei mixerGetControlDetails MMSYSERROR_INVALIDPARAM...vielleicht schafft ihr es ja die MSDN besser zu interpretieren als ich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":\"
      alt="😕"
    /></p>
<pre><code class="language-cpp">rc = mixerOpen(&amp;hMixer, (UINT)m_currentOb-&gt;waveIn.m_hWaveIn,0,0,MIXER_OBJECTF_HWAVEIN);
			if (MMSYSERR_NOERROR != rc) {
				return;
			}

			ZeroMemory(&amp;mxl,sizeof(mxl));
			mxl.cbStruct = sizeof(mxl);

			//mxl.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_WAVEIN;

			rc = mixerGetLineInfo((HMIXEROBJ)m_currentOb-&gt;waveIn.m_hWaveIn, &amp;mxl,
                           MIXER_OBJECTF_HWAVEIN);

			if(rc != MMSYSERR_NOERROR)
				return;

			ZeroMemory(&amp;mxlc, sizeof(mxlc));
			mxlc.cbStruct = sizeof(mxlc);
			mxlc.dwLineID = mxl.dwLineID;
			mxlc.dwControlType = MIXERCONTROL_CONTROLTYPE_PEAKMETER;
			mxlc.cControls = 1;
			mxlc.cbmxctrl = sizeof(mxc);
			mxlc.pamxctrl = &amp;mxc;
			ZeroMemory(&amp;mxc, sizeof(mxc));
			mxc.cbStruct = sizeof(mxc);
			//MIXER_GETLINECONTROLSF_ONEBYTYPE
			rc = mixerGetLineControls((HMIXEROBJ)m_currentOb-&gt;waveIn.m_hWaveIn,&amp;mxlc,
									   MIXER_OBJECTF_HWAVEIN);

			if(rc != MMSYSERR_NOERROR)
				return;

			MIXERCONTROLDETAILS mxcd;             // Gets the control values.
			MIXERCONTROLDETAILS_SIGNED volStruct; // Gets the control values.
			long volume;                          // Holds the final volume value.

			// Initialize the MIXERCONTROLDETAILS structure
			ZeroMemory(&amp;mxcd, sizeof(mxcd));
			mxcd.cbStruct = sizeof(mxcd);
			mxcd.cbDetails = sizeof(volStruct);
			mxcd.dwControlID = mxc.dwControlID;
			mxcd.paDetails = &amp;volStruct;
			mxcd.cChannels = 1;

			// Get the current value of the peakmeter control. Typically, you
			// would set a timer in your program to query the volume every 10th
			// of a second or so.

			//MIXER_GETCONTROLDETAILSF_VALUE
			rc = mixerGetControlDetails((HMIXEROBJ)m_currentOb-&gt;waveIn.m_hWaveIn, &amp;mxcd,
									 MIXER_OBJECTF_HWAVEIN);
		/*	rc = mixerGetControlDetails((HMIXEROBJ)hMixer, &amp;mxcd,
										 MIXER_GETCONTROLDETAILSF_VALUE);*/

			if (MMSYSERR_NOERROR != rc) {
				return;
			}
			volume = volStruct.lValue;

			// Get the absolute value of the volume.
			if (volume &lt; 0)
				volume = -volume;

			m_ctrlPeakMeter.SetMeterBands(1, mxc.Bounds.lMaximum);
			int iArray[1];
			iArray[0] = volume;
			m_ctrlPeakMeter.SetData(iArray, 0, 1);

			mixerClose(hMixer);
</code></pre>
<p>Danke</p>
<p>Kevin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/506982</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/506982</guid><dc:creator><![CDATA[Surkevin]]></dc:creator><pubDate>Thu, 22 Apr 2004 19:04:08 GMT</pubDate></item><item><title><![CDATA[Reply to Lautstärke von HWAVEIN rausfinden on Fri, 23 Apr 2004 05:26:06 GMT]]></title><description><![CDATA[<p>Willst du die eingestellte Lautstärke ermitteln, oder die aktuell aufgenommene?<br />
Falls letzteres ist das vielleicht ein kleiner Anstoß: <a href="http://www.c-plusplus.net/forum/viewtopic.php?t=53394" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=53394</a> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/507113</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/507113</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Fri, 23 Apr 2004 05:26:06 GMT</pubDate></item><item><title><![CDATA[Reply to Lautstärke von HWAVEIN rausfinden on Fri, 23 Apr 2004 12:09:30 GMT]]></title><description><![CDATA[<p>Hi!<br />
Jo danke...aber ich hab leider nicht ganz verstanden wie man jetzt aus nem Datenblock den man sich vom Treiber holt die Lautstärke herausfinden kann <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":\"
      alt="😕"
    /><br />
Ich denke auch, dass das nicht wirklich flüssig ist denn es vergeht ja ne ziemlich große Zeit bevor der nächste Block eingelesen wird...wenn ich dann erst die neue Mikrofonhöhe ausgebe ist das ziemlich langsam..alle 0,25 Sekunden mal ne Aktualisierung ... wow <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Sehe ich auch deutlich am WaveOut..da hab ich nen Slider gecodet und nach jedem &quot;Ausschub&quot; an den Treiber wird die neue Position festgesetzt...da wird bei low Qualität 10 Sekunden nur 3 Mal was an den Treiber geschickt..das reicht wirklich gar nicht!</p>
<p>Kevin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/507358</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/507358</guid><dc:creator><![CDATA[Surkevin]]></dc:creator><pubDate>Fri, 23 Apr 2004 12:09:30 GMT</pubDate></item></channel></rss>