• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • BanterClient
  • banter::BanterClient Class

    class banter::BanterClient

    The top-level API for Banter acoustic communication: send and receive packets as sound. More...

    Header: #include <BanterClient>
    Since: 1.0
    Inherits: QObject

    Detailed Description

    BanterClient joins codec selection, the BanterDspStack and audio input and output in one class with no widget dependencies. configure() sets it up. send() sends a packet through the medium-access gate, which listens before it talks and fragments a payload larger than the codec can carry. packetReceived() and packetSent() report the traffic.

    It runs in one of two modes. Self-hosted, start() opens the speaker and the microphone and the client drives itself. Hosted in an audio graph, the graph calls processRx() and generateTx() and the client opens no device. With useWorkerThread set in the configuration, the client moves itself to a DSP worker thread in configure(), and later calls from other threads must be queued.

    DiscoveryClient creates one for acoustic discovery, and CommsCarrierBanter creates one as its carrier; the Banter lab creates them for tests.

    See also BanterDiscovery.