Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // BroadcastDeviation is the max deviation for AM Broadcast // which is 5 KHz (10 KHz bandwidth). BroadcastDeviation rf.Hz = 5 * rf.KHz )
Functions ¶
This section is empty.
Types ¶
type Demodulator ¶
type Demodulator struct {
// contains filtered or unexported fields
}
Demodulator contains info about
func Demodulate ¶
func Demodulate(reader sdr.Reader, cfg DemodulatorConfig) (*Demodulator, error)
Demodulate will create a new Demodulator, to read FM audio from an IQ stream.
func (Demodulator) Read ¶
func (d Demodulator) Read(audio []float32) (int, error)
Read will (partially?) fill the buffer with audio samples.
func (Demodulator) Reader ¶
func (d Demodulator) Reader() sdr.Reader
Reader will return the underlying reader (TODO: Remove this)
func (Demodulator) SampleRate ¶
func (d Demodulator) SampleRate() uint
SampleRate will return the *audio* sample rate.
type DemodulatorConfig ¶
type DemodulatorConfig struct { // Center frequency of the signal in the IQ data. CenterFrequency rf.Hz // Deviation is the maximum difference between modulated and carrier // frequencies. This is half of the total bandwidth. Deviation rf.Hz // Downsample will define rate to downsample the samples to bring it to // a sensible audio sample rate. Downsample uint // Planner will be used to perform the FFTs used to filter the FM signal. Planner fft.Planner }
DemodulatorConfig will define how the demodulator should decode audio from the iq data.
Click to show internal directories.
Click to hide internal directories.