Wideband autonomous SDR analysis engine forked from sdr-visual-suite
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.

29 lines
593B

  1. package gpudemod
  2. type BatchRunner struct {
  3. eng *Engine
  4. }
  5. func NewBatchRunner(maxSamples int, sampleRate int) (*BatchRunner, error) {
  6. eng, err := New(maxSamples, sampleRate)
  7. if err != nil {
  8. return nil, err
  9. }
  10. return &BatchRunner{eng: eng}, nil
  11. }
  12. func (r *BatchRunner) Close() {
  13. if r == nil || r.eng == nil {
  14. return
  15. }
  16. r.eng.Close()
  17. r.eng = nil
  18. }
  19. func (r *BatchRunner) ShiftFilterDecimateBatch(iq []complex64, jobs []ExtractJob) ([][]complex64, []int, error) {
  20. if r == nil || r.eng == nil {
  21. return nil, nil, ErrUnavailable
  22. }
  23. return r.eng.ShiftFilterDecimateBatch(iq, jobs)
  24. }