arduino-audio-tools
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions | Variables
vban.h File Reference
#include <stdint.h>
#include <string.h>
#include <inttypes.h>

Go to the source code of this file.

Classes

struct  VBan
 
struct  VBAN_PING0
 
struct  VBanHeader
 

Macros

#define VBAN_BIT_RESOLUTION_MASK   0x07
 
#define VBAN_BPS_MASK   0xE0
 
#define VBAN_BPS_MAXNUMBER   25
 
#define VBAN_CHANNELS_MAX_NB   256
 
#define VBAN_CODEC_MASK   0xF0
 
#define VBAN_DATA_MAX_SIZE   (VBAN_PROTOCOL_MAX_SIZE - VBAN_HEADER_SIZE)
 
#define VBAN_DATATYPE_MASK   0x07
 
#define VBAN_DATATYPE_MAXNUMBER   1
 
#define VBAN_HEADER_SIZE   (4 + 1 + 1 + 1 + 1 + 16)
 
#define VBAN_PACKET_COUNTER_BYTES   4
 
#define VBAN_PACKET_HEADER_BYTES   24
 
#define VBAN_PACKET_MAX_LEN_BYTES   (VBAN_PACKET_HEADER_BYTES + VBAN_PACKET_COUNTER_BYTES + VBAN_PACKET_MAX_SAMPLES*2)
 
#define VBAN_PACKET_MAX_SAMPLES   256
 
#define VBAN_PACKET_NUM_SAMPLES   256
 
#define VBAN_PROTOCOL_MASK   0xE0
 
#define VBAN_PROTOCOL_MAX_SIZE   1464
 
#define VBAN_PROTOCOL_SERVICE   0x60
 
#define VBAN_RESERVED_MASK   0x08
 
#define VBAN_SAMPLES_MAX_NB   256
 
#define VBAN_SERVICE_CHATUTF8   0x01
 
#define VBAN_SERVICE_FNCT_PING0   0x00
 
#define VBAN_SERVICE_FNCT_REPLY   0x80
 
#define VBAN_SERVICE_IDENTIFICATION   0x00
 
#define VBAN_SERVICE_RTPACKET   0x21
 
#define VBAN_SERVICE_RTPACKETREGISTER   0x20
 
#define VBAN_SR_MASK   0x1F
 
#define VBAN_SR_MAXNUMBER   21
 
#define VBAN_STREAM_NAME_SIZE   16
 
#define VBAN_STREAMTYPE_MASK   0xF0
 

Enumerations

enum  VBanBitResolution {
  VBAN_BITFMT_8_INT = 0 , VBAN_BITFMT_16_INT , VBAN_BITFMT_24_INT , VBAN_BITFMT_32_INT ,
  VBAN_BITFMT_32_FLOAT , VBAN_BITFMT_64_FLOAT , VBAN_BITFMT_12_INT , VBAN_BITFMT_10_INT ,
  VBAN_BIT_RESOLUTION_MAX
}
 
enum  VBanCodec {
  VBAN_CODEC_PCM = 0x00 , VBAN_CODEC_VBCA = 0x10 , VBAN_CODEC_VBCV = 0x20 , VBAN_CODEC_UNDEFINED_3 = 0x30 ,
  VBAN_CODEC_UNDEFINED_4 = 0x40 , VBAN_CODEC_UNDEFINED_5 = 0x50 , VBAN_CODEC_UNDEFINED_6 = 0x60 , VBAN_CODEC_UNDEFINED_7 = 0x70 ,
  VBAN_CODEC_UNDEFINED_8 = 0x80 , VBAN_CODEC_UNDEFINED_9 = 0x90 , VBAN_CODEC_UNDEFINED_10 = 0xA0 , VBAN_CODEC_UNDEFINED_11 = 0xB0 ,
  VBAN_CODEC_UNDEFINED_12 = 0xC0 , VBAN_CODEC_UNDEFINED_13 = 0xD0 , VBAN_CODEC_UNDEFINED_14 = 0xE0 , VBAN_CODEC_USER = 0xF0
}
 
enum  VBanDataTypeList { VBAN_DATATYPE_8BITS = 0 }
 
enum  VBanProtocol {
  VBAN_PROTOCOL_AUDIO = 0x00 , VBAN_PROTOCOL_SERIAL = 0x20 , VBAN_PROTOCOL_TXT = 0x40 , VBAN_PROTOCOL_UNDEFINED_1 = 0x80 ,
  VBAN_PROTOCOL_UNDEFINED_2 = 0xA0 , VBAN_PROTOCOL_UNDEFINED_3 = 0xC0 , VBAN_PROTOCOL_UNDEFINED_4 = 0xE0
}
 
enum  VBanSampleRates {
  SAMPLE_RATE_6000_HZ , SAMPLE_RATE_12000_HZ , SAMPLE_RATE_24000_HZ , SAMPLE_RATE_48000_HZ ,
  SAMPLE_RATE_96000_HZ , SAMPLE_RATE_192000_HZ , SAMPLE_RATE_384000_HZ , SAMPLE_RATE_8000_HZ ,
  SAMPLE_RATE_16000_HZ , SAMPLE_RATE_32000_HZ , SAMPLE_RATE_64000_HZ , SAMPLE_RATE_128000_HZ ,
  SAMPLE_RATE_256000_HZ , SAMPLE_RATE_512000_HZ , SAMPLE_RATE_11025_HZ , SAMPLE_RATE_22050_HZ ,
  SAMPLE_RATE_44100_HZ , SAMPLE_RATE_88200_HZ , SAMPLE_RATE_176400_HZ , SAMPLE_RATE_352800_HZ ,
  SAMPLE_RATE_705600_HZ
}
 
enum  VBanStreamType {
  VBAN_TXT_ASCII = 0x00 , VBAN_TXT_UTF8 = 0x10 , VBAN_TXT_WCHAR = 0x20 , VBAN_TXT_UNDEFINED_3 = 0x30 ,
  VBAN_TXT_UNDEFINED_4 = 0x40 , VBAN_TXT_UNDEFINED_5 = 0x50 , VBAN_TXT_UNDEFINED_6 = 0x60 , VBAN_TXT_UNDEFINED_7 = 0x70 ,
  VBAN_TXT_UNDEFINED_8 = 0x80 , VBAN_TXT_UNDEFINED_9 = 0x90 , VBAN_TXT_UNDEFINED_10 = 0xA0 , VBAN_TXT_UNDEFINED_11 = 0xB0 ,
  VBAN_TXT_UNDEFINED_12 = 0xC0 , VBAN_TXT_UNDEFINED_13 = 0xD0 , VBAN_TXT_UNDEFINED_14 = 0xE0 , VBAN_TXT_USER = 0xF0
}
 

Functions

struct VBAN_PING0 __attribute__ ((packed))
 

Variables

enum VBanDataTypeList __attribute__
 
char ApplicationName_ascii [64]
 
uint32_t bitfeature
 
uint32_t bitfeatureEx
 
uint32_t bitType
 
uint32_t color_rgb
 
char DeviceName_ascii [64]
 
char DistantIP_ascii [32]
 
uint16_t DistantPort
 
uint16_t DistantReserved
 
char GPS_Position [8]
 
char HostName_ascii [64]
 
char LangCode_ascii [8]
 
char ManufacturerName_ascii [64]
 
uint32_t MaxRate
 
uint32_t MinRate
 
uint8_t nVersion [4]
 
uint32_t PreferedRate
 
char reserved_ascii [8]
 
char reservedEx [64]
 
char USER_Position [8]
 
char UserComment_utf8 [128]
 
char UserName_utf8 [128]
 
static int const VBanBitResolutionSize [VBAN_BIT_RESOLUTION_MAX]
 
static long const VBanBPSList [25]
 
static long const VBanSRList [21]
 

Macro Definition Documentation

◆ VBAN_BIT_RESOLUTION_MASK

#define VBAN_BIT_RESOLUTION_MASK   0x07

◆ VBAN_BPS_MASK

#define VBAN_BPS_MASK   0xE0

◆ VBAN_BPS_MAXNUMBER

#define VBAN_BPS_MAXNUMBER   25

◆ VBAN_CHANNELS_MAX_NB

#define VBAN_CHANNELS_MAX_NB   256

◆ VBAN_CODEC_MASK

#define VBAN_CODEC_MASK   0xF0

◆ VBAN_DATA_MAX_SIZE

#define VBAN_DATA_MAX_SIZE   (VBAN_PROTOCOL_MAX_SIZE - VBAN_HEADER_SIZE)

◆ VBAN_DATATYPE_MASK

#define VBAN_DATATYPE_MASK   0x07

◆ VBAN_DATATYPE_MAXNUMBER

#define VBAN_DATATYPE_MAXNUMBER   1

◆ VBAN_HEADER_SIZE

#define VBAN_HEADER_SIZE   (4 + 1 + 1 + 1 + 1 + 16)

◆ VBAN_PACKET_COUNTER_BYTES

#define VBAN_PACKET_COUNTER_BYTES   4

◆ VBAN_PACKET_HEADER_BYTES

#define VBAN_PACKET_HEADER_BYTES   24

◆ VBAN_PACKET_MAX_LEN_BYTES

#define VBAN_PACKET_MAX_LEN_BYTES   (VBAN_PACKET_HEADER_BYTES + VBAN_PACKET_COUNTER_BYTES + VBAN_PACKET_MAX_SAMPLES*2)

◆ VBAN_PACKET_MAX_SAMPLES

#define VBAN_PACKET_MAX_SAMPLES   256

◆ VBAN_PACKET_NUM_SAMPLES

#define VBAN_PACKET_NUM_SAMPLES   256

◆ VBAN_PROTOCOL_MASK

#define VBAN_PROTOCOL_MASK   0xE0

◆ VBAN_PROTOCOL_MAX_SIZE

#define VBAN_PROTOCOL_MAX_SIZE   1464

◆ VBAN_PROTOCOL_SERVICE

#define VBAN_PROTOCOL_SERVICE   0x60

◆ VBAN_RESERVED_MASK

#define VBAN_RESERVED_MASK   0x08

◆ VBAN_SAMPLES_MAX_NB

#define VBAN_SAMPLES_MAX_NB   256

◆ VBAN_SERVICE_CHATUTF8

#define VBAN_SERVICE_CHATUTF8   0x01

◆ VBAN_SERVICE_FNCT_PING0

#define VBAN_SERVICE_FNCT_PING0   0x00

◆ VBAN_SERVICE_FNCT_REPLY

#define VBAN_SERVICE_FNCT_REPLY   0x80

◆ VBAN_SERVICE_IDENTIFICATION

#define VBAN_SERVICE_IDENTIFICATION   0x00

◆ VBAN_SERVICE_RTPACKET

#define VBAN_SERVICE_RTPACKET   0x21

◆ VBAN_SERVICE_RTPACKETREGISTER

#define VBAN_SERVICE_RTPACKETREGISTER   0x20

◆ VBAN_SR_MASK

#define VBAN_SR_MASK   0x1F

◆ VBAN_SR_MAXNUMBER

#define VBAN_SR_MAXNUMBER   21

◆ VBAN_STREAM_NAME_SIZE

#define VBAN_STREAM_NAME_SIZE   16

◆ VBAN_STREAMTYPE_MASK

#define VBAN_STREAMTYPE_MASK   0xF0

Enumeration Type Documentation

◆ VBanBitResolution

Enumerator
VBAN_BITFMT_8_INT 
VBAN_BITFMT_16_INT 
VBAN_BITFMT_24_INT 
VBAN_BITFMT_32_INT 
VBAN_BITFMT_32_FLOAT 
VBAN_BITFMT_64_FLOAT 
VBAN_BITFMT_12_INT 
VBAN_BITFMT_10_INT 
VBAN_BIT_RESOLUTION_MAX 

◆ VBanCodec

enum VBanCodec
Enumerator
VBAN_CODEC_PCM 
VBAN_CODEC_VBCA 
VBAN_CODEC_VBCV 
VBAN_CODEC_UNDEFINED_3 
VBAN_CODEC_UNDEFINED_4 
VBAN_CODEC_UNDEFINED_5 
VBAN_CODEC_UNDEFINED_6 
VBAN_CODEC_UNDEFINED_7 
VBAN_CODEC_UNDEFINED_8 
VBAN_CODEC_UNDEFINED_9 
VBAN_CODEC_UNDEFINED_10 
VBAN_CODEC_UNDEFINED_11 
VBAN_CODEC_UNDEFINED_12 
VBAN_CODEC_UNDEFINED_13 
VBAN_CODEC_UNDEFINED_14 
VBAN_CODEC_USER 

◆ VBanDataTypeList

Enumerator
VBAN_DATATYPE_8BITS 

◆ VBanProtocol

Enumerator
VBAN_PROTOCOL_AUDIO 
VBAN_PROTOCOL_SERIAL 
VBAN_PROTOCOL_TXT 
VBAN_PROTOCOL_UNDEFINED_1 
VBAN_PROTOCOL_UNDEFINED_2 
VBAN_PROTOCOL_UNDEFINED_3 
VBAN_PROTOCOL_UNDEFINED_4 

◆ VBanSampleRates

Enumerator
SAMPLE_RATE_6000_HZ 
SAMPLE_RATE_12000_HZ 
SAMPLE_RATE_24000_HZ 
SAMPLE_RATE_48000_HZ 
SAMPLE_RATE_96000_HZ 
SAMPLE_RATE_192000_HZ 
SAMPLE_RATE_384000_HZ 
SAMPLE_RATE_8000_HZ 
SAMPLE_RATE_16000_HZ 
SAMPLE_RATE_32000_HZ 
SAMPLE_RATE_64000_HZ 
SAMPLE_RATE_128000_HZ 
SAMPLE_RATE_256000_HZ 
SAMPLE_RATE_512000_HZ 
SAMPLE_RATE_11025_HZ 
SAMPLE_RATE_22050_HZ 
SAMPLE_RATE_44100_HZ 
SAMPLE_RATE_88200_HZ 
SAMPLE_RATE_176400_HZ 
SAMPLE_RATE_352800_HZ 
SAMPLE_RATE_705600_HZ 

◆ VBanStreamType

Enumerator
VBAN_TXT_ASCII 
VBAN_TXT_UTF8 
VBAN_TXT_WCHAR 
VBAN_TXT_UNDEFINED_3 
VBAN_TXT_UNDEFINED_4 
VBAN_TXT_UNDEFINED_5 
VBAN_TXT_UNDEFINED_6 
VBAN_TXT_UNDEFINED_7 
VBAN_TXT_UNDEFINED_8 
VBAN_TXT_UNDEFINED_9 
VBAN_TXT_UNDEFINED_10 
VBAN_TXT_UNDEFINED_11 
VBAN_TXT_UNDEFINED_12 
VBAN_TXT_UNDEFINED_13 
VBAN_TXT_UNDEFINED_14 
VBAN_TXT_USER 

Function Documentation

◆ __attribute__()

struct VBAN_PING0 __attribute__ ( (packed)  )

Variable Documentation

◆ __attribute__

enum VBanDataTypeList __attribute__

◆ ApplicationName_ascii

char ApplicationName_ascii[64]

◆ bitfeature

uint32_t bitfeature

◆ bitfeatureEx

uint32_t bitfeatureEx

◆ bitType

uint32_t bitType

◆ color_rgb

uint32_t color_rgb

◆ DeviceName_ascii

char DeviceName_ascii[64]

◆ DistantIP_ascii

char DistantIP_ascii[32]

◆ DistantPort

uint16_t DistantPort

◆ DistantReserved

uint16_t DistantReserved

◆ GPS_Position

char GPS_Position[8]

◆ HostName_ascii

char HostName_ascii[64]

◆ LangCode_ascii

char LangCode_ascii[8]

◆ ManufacturerName_ascii

char ManufacturerName_ascii[64]

◆ MaxRate

uint32_t MaxRate

◆ MinRate

uint32_t MinRate

◆ nVersion

uint8_t nVersion[4]

◆ PreferedRate

uint32_t PreferedRate

◆ reserved_ascii

char reserved_ascii[8]

◆ reservedEx

char reservedEx[64]

◆ USER_Position

char USER_Position[8]

◆ UserComment_utf8

char UserComment_utf8[128]

◆ UserName_utf8

char UserName_utf8[128]

◆ VBanBitResolutionSize

int const VBanBitResolutionSize[VBAN_BIT_RESOLUTION_MAX]
static
Initial value:
=
{
1, 2, 3, 4, 4, 8,
}

◆ VBanBPSList

long const VBanBPSList[25]
static
Initial value:
=
{
0, 110, 150, 300, 600,
1200, 2400, 4800, 9600, 14400,
19200, 31250, 38400, 57600, 115200,
128000, 230400, 250000, 256000, 460800,
921600,1000000,1500000,2000000, 3000000
}

◆ VBanSRList

long const VBanSRList[21]
static
Initial value:
=
{
6000, 12000, 24000, 48000, 96000, 192000, 384000,
8000, 16000, 32000, 64000, 128000, 256000, 512000,
11025, 22050, 44100, 88200, 176400, 352800, 705600
}