You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
981B

  1. //go:build !cufft
  2. package gpudemod
  3. import "errors"
  4. type DemodType int
  5. const (
  6. DemodNFM DemodType = iota
  7. DemodWFM
  8. DemodAM
  9. DemodUSB
  10. DemodLSB
  11. DemodCW
  12. )
  13. type Engine struct {
  14. maxSamples int
  15. sampleRate int
  16. lastShiftUsedGPU bool
  17. }
  18. func Available() bool { return false }
  19. func New(maxSamples int, sampleRate int) (*Engine, error) {
  20. return nil, errors.New("CUDA demod not available: cufft build tag not enabled")
  21. }
  22. func (e *Engine) SetFIR(taps []float32) {}
  23. func (e *Engine) LastShiftUsedGPU() bool { return false }
  24. func (e *Engine) LastDemodUsedGPU() bool { return false }
  25. func (e *Engine) Demod(iq []complex64, offsetHz float64, bw float64, mode DemodType) ([]float32, int, error) {
  26. return nil, 0, errors.New("CUDA demod not available: cufft build tag not enabled")
  27. }
  28. func (e *Engine) DemodFused(iq []complex64, offsetHz float64, bw float64, mode DemodType) ([]float32, int, error) {
  29. return e.Demod(iq, offsetHz, bw, mode)
  30. }
  31. func (e *Engine) Close() {}