Why isn't this AM Demod GNU Radio flow graph working with different sampling rates? I am trying to demodulate an AM signal in GNU Radio, and I am having problems with the sampling rates.  I will start off with an example where the flow graph was working. The sampling rate is 256kHz, and it works just fine:


Next, I tried a sampling rate of 192kHz, and then it didn't work.  Is there a problem with this flow graph?



Next, I modified the 2nd flow graph (changed the sampling rate, but didn't need to), and it worked almost perfectly, other than that the voice sounded very slightly too low pitch/slow.  This sampling rate suffered from the same problem as that of figure 2, however I tweaked the rational resampler block until the voices sounded normal.


As some background, I am running an RTL SDR (DVB-T) dongle, on an Odroid U3 (ARM architecture).  I have a "Ham it up" upconverter, so that the AM (810Kkz) is shifted up by 125MHz, into the VHF band that the dongle can actually receive.

UPDATE:  There were two issues with the flow graph: 


The filter cutoff frequency needed to be calculated using normalized frequency (see MBaz's detailed answer).
The R820T chip does indeed, as MBaz ascertained in the comment section, have only a limited set of sampling rates that it supports.


In order for the flow graph to output natural sounding audio, it must use one of the acceptable sampling rates, and also have the proper filter setting.  The 2nd and 3rd flow graphs didn't work because they had the wrong sample rates.
In order to make the filter calculations easer, you should specify its sampling rate equal to the source's. Assume that:


$D$ is the filter's decimation factor
$f_s$ is the source sampling rate
$f_c$ is the filter's specified cutoff frequency
$f_f$ is the filter's specified sampling rate


The actual cutoff frequency from the point of view of the filter's output, $f_a$, is calculated as: $$f_a=\frac{2Df_c}{f_f}\frac{f_s}{2D}=\frac{f_cf_s}{f_f}.$$ This is because the filter doesn't care what the actual sampling rate is; what it needs to know is the cutoff frequency as a fraction of the normalized Nyquist frequency, which is $2Df_c/f_f$ after accounting for the decimation.

In your first flowgraph, the actual cutoff frequency is $5\cdot256/64=20$ kHz, not 5 kHz (the same problem occurs in the second flowgraph; in the third, the cutoff is 25 kHz). If you specify the filter sampling rate equal to the source rate ($f_s/f_f=1$), then your signal will actually be filtered at 5 kHz.

You also need to make sure that the product of the source sampling rate, times all your interpolation, divided by all your decimation, is equal to the sink sampling rate. In the third flowgraph, the sampling rate into the sink is 16 kHz, not 48 kHz.

Having said that, I think there's another problem in your flowgraph. I assume that you're demodulating AM DSB-LC. If the RTL-SDR device is centered exactly at the carrier frequency, then you only need the low-pass filter; no complex to mag conversion is necessary. You only need to keep the real part of the signal (send the imaginary part to a null sink -- you can do this right after the RTL-SDR and save some computations).

You only need to do envelope detection when the AM signal is not in baseband. In that case, you calculate its absolute value and then low-pass filter it. You also need a final high-pass filter to eliminate the DC bias present at the LPF output.