Chirp C SDK  3.3.1
Use Chirp to send data over sound from your C application.
chirp_sdk_events.h File Reference

Events implementations of the C SDK (callbacks and states). More...

#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  chirp_sdk_callback_set_t
 

Typedefs

typedef void(* chirp_sdk_callback_t) (void *ptr, uint8_t *bytes, size_t length, uint8_t channel)
 
typedef void(* chirp_sdk_state_callback_t) (void *ptr, chirp_sdk_state_t old_state, chirp_sdk_state_t new_state)
 

Enumerations

enum  chirp_sdk_state_t {
  CHIRP_SDK_STATE_NOT_CREATED, CHIRP_SDK_STATE_STOPPED, CHIRP_SDK_STATE_RUNNING, CHIRP_SDK_STATE_SENDING,
  CHIRP_SDK_STATE_RECEIVING
}
 

Detailed Description

Events implementations of the C SDK (callbacks and states).


ASIO CONFIDENTIAL

All contents are strictly proprietary, and not for copying, resale, or use outside of the agreed license.

Copyright © 2011-2019, Asio Ltd. All rights reserved.


Typedef Documentation

◆ chirp_sdk_callback_t

typedef void(* chirp_sdk_callback_t) (void *ptr, uint8_t *bytes, size_t length, uint8_t channel)

On_sending, on_sent, on_receiving and on_received callback prototype definitions. These callbacks are called if set and respectively if the SDK is sending, sent, is receiving or received some data.

Parameters
ptrPointer of data. It's either the pointer set when calling chirp_sdk_set_callback_ptr or NULL.
byteson_sending : The data being sent. on_sent : The data sent. on_receiving : NULL. on_received : NULL if the decode failed or the data received.
lengthon_sending : The length, in bytes, of the data being sent. on_sent : The length, in bytes, of the data sent. on_receiving : 0. on_received : 0 if the decode failed or the length, in bytes, of the data received.
channelChannel on which the data has been received.

◆ chirp_sdk_state_callback_t

typedef void(* chirp_sdk_state_callback_t) (void *ptr, chirp_sdk_state_t old_state, chirp_sdk_state_t new_state)

On_state_changed callback prototype definition. This is called if the callback has been set and when the SDK's state is changing. The possibles values are the one of the chirp_sdk_state_t enum located in chirp_sdk_states.h.

Parameters
ptrPointer of data. It's either the pointer set when calling chirp_sdk_set_callback_ptr or NULL.
old_stateThe old state of the SDK before reaching this callback.
new_stateThe new state of the SDK when leaving this callback.

Enumeration Type Documentation

◆ chirp_sdk_state_t

Various states the SDK can return.

Enumerator
CHIRP_SDK_STATE_NOT_CREATED 

The audio processing has not been initialised yet.

CHIRP_SDK_STATE_STOPPED 

The SDK is not processing audio.

CHIRP_SDK_STATE_RUNNING 

The audio processing is running.

CHIRP_SDK_STATE_SENDING 

The SDK is sending data.

CHIRP_SDK_STATE_RECEIVING 

The SDK is receiving data.