Go-based FM stereo transmitter with RDS, Windows-first and cross-platform
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

39 строки
893B

  1. package rds
  2. // RDSConfig holds configuration data used to build the RDS data stream.
  3. type RDSConfig struct {
  4. // Program Identification – 16-bit school identifier for the broadcast.
  5. PI uint16
  6. // Program Service name (typically 8 ASCII characters).
  7. PS string
  8. // RadioText (up to 64 characters). Short messages describing the current song or info.
  9. RT string
  10. // Program Type (0-31 standard RDS PTY values).
  11. PTY uint8
  12. // Traffic Announcement (TA) flag.
  13. TA bool
  14. // Traffic Program (TP) flag.
  15. TP bool
  16. // SampleRate that the encoder will work against. Defaults to 48000 when zero.
  17. SampleRate float64
  18. }
  19. // DefaultConfig returns a minimal config with sane defaults.
  20. func DefaultConfig() RDSConfig {
  21. return RDSConfig{
  22. PI: 0x1234,
  23. PS: "FM-RDS",
  24. RT: "Go-based MPX",
  25. PTY: 0,
  26. TA: false,
  27. TP: false,
  28. SampleRate: 48000,
  29. }
  30. }