<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=7445&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / How to disable resamplig in Firefox]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=7445</link>
		<description><![CDATA[The most recent posts in How to disable resamplig in Firefox.]]></description>
		<lastBuildDate>Fri, 10 Oct 2025 13:32:06 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: How to disable resamplig in Firefox]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=58511#p58511</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>_https://searchfox.org/firefox-main/source/dom/media/AudioConverter.cpp</p><div class="codebox"><pre><code>#include &quot;AudioConverter.h&quot;

#include &lt;speex/speex_resampler.h&gt;</code></pre></div></div></blockquote></div><div class="quotebox"><blockquote><div><p>Open the Firefox browser.<br />Type <span class="bbc">about:support</span> into the address bar and press Enter.<br />The page will load, showing a detailed report of your Firefox setup.</p></div></blockquote></div><p>To change the &quot;Preferred Sample Rate&quot; in <span class="bbc">about:support</span>, you have to edit the source code with a text editor and recompile Firefox. For example:</p><p>_https://searchfox.org/firefox-main/source/dom/media/CubebUtils.cpp</p><div class="codebox"><pre><code>$ cat firefox/dom/media/CubebUtils.cpp | grep PreferredSampleRate\(bool -A15
uint32_t PreferredSampleRate(bool aShouldResistFingerprinting) {
  StaticMutexAutoLock lock(sMutex);
//  if (sCubebForcedSampleRate) {
//    return sCubebForcedSampleRate;
//  }
//  if (aShouldResistFingerprinting) {
//    return 44100;
//  }
//  if (!InitPreferredSampleRate()) {
//    return 44100;
//  }
//  MOZ_ASSERT(sPreferredSampleRate);
//  return sPreferredSampleRate;
    return 48000;
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (igorzwx)]]></author>
			<pubDate>Fri, 10 Oct 2025 13:32:06 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=58511#p58511</guid>
		</item>
		<item>
			<title><![CDATA[How to disable resamplig in Firefox]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=58432#p58432</link>
			<description><![CDATA[<p>Resampling in Firefox is easy to disable:</p><div class="codebox"><pre><code>$ cat firefox/dom/media/VideoUtils.cpp | grep DecideAudioPlaybackSampleRate -A27
uint32_t DecideAudioPlaybackSampleRate(const AudioInfo&amp; aInfo,
                                       bool aShouldResistFingerprinting) {
//  bool resampling = StaticPrefs::media_resampling_enabled();

//  uint32_t rate = 0;

//  if (resampling) {
//    rate = 48000;
//  } else if (aInfo.mRate &gt;= 44100) {
//    // The original rate is of good quality and we want to minimize unecessary
//    // resampling, so we let cubeb decide how to resample (if needed). Cap to
//    // 384kHz for good measure.
//    rate = std::min&lt;unsigned&gt;(aInfo.mRate, 384000u);
//  } else {
//    // We will resample all data to match cubeb&#039;s preferred sampling rate.
//    rate = CubebUtils::PreferredSampleRate(aShouldResistFingerprinting);
//    if (rate &gt; 768000) {
//      // bogus rate, fall back to something else;
//      rate = 48000;
//    }
//  }
//  MOZ_DIAGNOSTIC_ASSERT(rate, &quot;output rate can&#039;t be 0.&quot;);
    
//  return rate;

  return aInfo.mRate;
}</code></pre></div><p>Firefox is easy to compile.</p><p>What is special about Chromium is that it has many resamplers inside:</p><div class="quotebox"><blockquote><div><p><strong>[BUG] WebAudio always resampling to the output device sample rate, even if a different one is specified. </strong><br />_https://issues.chromium.org/issues/40944208</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (igorzwx)]]></author>
			<pubDate>Mon, 06 Oct 2025 17:20:59 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=58432#p58432</guid>
		</item>
	</channel>
</rss>
