capture

package
v0.0.0-...-15188ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SampleRate        = 44100
	BaudRate          = 1200
	Tone1200Hz        = 1200.0
	Tone2200Hz        = 2200.0
	BitsPerSample     = 8
	SamplesPerBaud    = SampleRate / BaudRate
	Volume            = 1.0
	TwoPi             = 2.0 * math.Pi
	TailFlags         = 2
	MaxCallsignLength = 6  // Maximum callsign length in AX.25
	MaxSSID           = 15 // Maximum SSID value in AX.25
)

Variables

This section is empty.

Functions

func Int16ToFloat32

func Int16ToFloat32(data []int16) []float32

Types

type Capture

type Capture interface {
	Start() error
	Stop()
	Type() string
}

func New

func New(cfg config.Config, outputChan chan []byte, logger *log.Logger) (Capture, error)

type SdrCapture

type SdrCapture struct {
	Cmd *exec.Cmd
	// contains filtered or unexported fields
}

func NewSdrCapture

func NewSdrCapture(cfg config.Sdr, outputChan chan []byte, logger *log.Logger) (*SdrCapture, error)

func (*SdrCapture) Start

func (s *SdrCapture) Start() error

func (*SdrCapture) Stop

func (s *SdrCapture) Stop()

func (*SdrCapture) Type

func (s *SdrCapture) Type() string

type SoundcardCapture

type SoundcardCapture struct {
	StreamParams   portaudio.StreamParameters
	SampleRate     int
	BaudRate       float64
	MarkFrequency  float64
	SpaceFrequency float64
	ChannelNum     int
	BitDepth       int
	BufferSize     int
	// contains filtered or unexported fields
}

func NewSoundcardCapture

func NewSoundcardCapture(cfg config.Config, outputChan chan []byte, logger *log.Logger) (*SoundcardCapture, error)

func (*SoundcardCapture) AprsToAx25ForTest

func (s *SoundcardCapture) AprsToAx25ForTest(raw string) ([]byte, error)

AprsToAx25ForTest exposes aprsToAx25 for test utilities.

func (*SoundcardCapture) GenerateAFSKForTest

func (s *SoundcardCapture) GenerateAFSKForTest(frame []byte) ([]float32, error)

GenerateAFSKForTest exposes generateAFSK for test utilities.

func (*SoundcardCapture) Play

func (s *SoundcardCapture) Play(msg string)

func (*SoundcardCapture) Start

func (s *SoundcardCapture) Start() error

func (*SoundcardCapture) Stop

func (s *SoundcardCapture) Stop()

func (*SoundcardCapture) Type

func (s *SoundcardCapture) Type() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL