def test_mono_direct(self): adapter = grc.DemodulatorAdapter(mode='NFM', input_rate=100000, output_rate=10000) self.assertIsInstance(adapter.get_demodulator(), NFMDemodulator) self.assertEqual( adapter.get_demodulator().get_output_type().get_sample_rate(), 10000)
def test_mono_resample(self): # NFM is an example of a mono demodulator adapter = grc.DemodulatorAdapter(mode='NFM', input_rate=100000, output_rate=22050) self.assertIsInstance(adapter.get_demodulator(), NFMDemodulator) self.assertNotEqual( adapter.get_demodulator().get_output_type().get_sample_rate(), 22050)
def test_stereo_direct(self): adapter = grc.DemodulatorAdapter(mode='AM-unsel', input_rate=100000, output_rate=10000) self.assertIsInstance(adapter.get_demodulator(), UnselectiveAMDemodulator) self.assertEqual( adapter.get_demodulator().get_output_type().get_sample_rate(), 10000)
def test_stereo_resample(self): # AM-unsel is an example of a stereo demodulator adapter = grc.DemodulatorAdapter(mode='AM-unsel', input_rate=100000, output_rate=22050) self.assertIsInstance(adapter.get_demodulator(), UnselectiveAMDemodulator) self.assertNotEqual( adapter.get_demodulator().get_output_type().get_sample_rate(), 22050)