arduino-audio-tools
Loading...
Searching...
No Matches
VBANStream.h
Go to the documentation of this file.
1
2#include <AsyncUDP.h>
3#include <WiFi.h>
4
8
9namespace audio_tools {
10
11class VBANConfig : public AudioInfo {
12 public:
14 sample_rate = 11025;
15 channels = 1;
16 bits_per_sample = 16;
17 }
20 const char* stream_name = "Stream1";
24 IPAddress target_ip{0, 0, 0, 0};
26 const char* ssid = nullptr;
28 const char* password = nullptr;
30 // set to true if samples are generated faster then sample rate
31 bool throttle_active = false;
32 // when negative the number of ms that are subtracted from the calculated wait
33 // time to fine tune Overload and Underruns
35 // defines the max write size
37 DEFAULT_BUFFER_SIZE * 2; // just good enough for 44100 stereo
39
40 //reply for discovery packet
41 uint32_t device_flags = 0x00000001; // default: receiver only
42 uint32_t bitfeature = 0x00000001; // default: audio only
43 uint32_t device_color = 0x00FF00; // green default
44 //const char* stream_name_reply = "VBAN SPOT PING";
45 const char* device_name = nullptr; // nullptr means use MAC by default
46 const char* manufacturer_name = "ESP32 AudioTools";
47 const char* application_name = "VBAN Streamer";
48 const char* host_name = nullptr; // will fallback to WiFi.getHostname()
49 const char* user_name = "User";
50 const char* user_comment = "ESP32 VBAN Audio Device";
51};
52
63class VBANStream : public AudioStream {
64 public:
67 def.mode = mode;
68 return def;
69 }
70
71 void setOutput(Print &out){
72 p_out = &out;
73 }
74
75 void setAudioInfo(AudioInfo info) override {
78 auto thc = throttle.defaultConfig();
80 thc.correction_us = cfg.throttle_correction_us;
82 if (cfg.mode == TX_MODE) {
84 }
85 }
86
88 this->cfg = cfg;
90 return begin();
91 }
92
93 bool begin() {
94 if (cfg.mode == TX_MODE) {
95 if (cfg.bits_per_sample != 16) {
96 LOGE("Only 16 bits supported")
97 return false;
98 }
100 return begin_tx();
101 } else {
102#ifdef ESP32
105#else
107#endif
108 return begin_rx();
109 }
110 }
111
112 size_t write(const uint8_t* data, size_t len) override {
113 if (!udp_connected) return 0;
114
115 int16_t* adc_data = (int16_t*)data;
116 size_t samples = len / (cfg.bits_per_sample/8);
117
118 // limit output speed
119 if (cfg.throttle_active) {
120 throttle.delayFrames(samples / cfg.channels);
121 }
122
123 for (int j = 0; j < samples; j++) {
125 if (tx_buffer.availableForWrite() == 0) {
127 *vban.packet_counter = packet_counter; // increment packet counter
128 // Send packet
131 cfg.udp_port);
132 } else {
135 }
136 // defile delay start time
139 }
140 }
141 return len;
142 }
143
145
146 size_t readBytes(uint8_t* data, size_t len) override {
147 TRACED();
148 size_t samples = len / (cfg.bits_per_sample/8);
149 if (cfg.throttle_active) {
150 throttle.delayFrames(samples / cfg.channels);
151 }
152 return rx_buffer.readArray(data, len);
153 }
154
156
157 protected:
158 const IPAddress broadcast_address{0, 0, 0, 0};
163 #ifdef ESP32
165 #else
167 #endif
168 bool udp_connected = false;
171 size_t bytes_received = 0;
172 bool available_active = false;
173 Print *p_out = nullptr;
174
175 bool begin_tx() {
176 if (!configure_tx()) {
177 return false;
178 }
179 start_wifi();
180 if (WiFi.status() != WL_CONNECTED) {
181 LOGE("Wifi not connected");
182 return false;
183 }
184 WiFi.setSleep(false);
185 IPAddress myIP = WiFi.localIP();
186 udp_connected = udp.connect(myIP, cfg.udp_port);
187 return udp_connected;
188 }
189
190 bool begin_rx() {
191 start_wifi();
192 if (WiFi.status() != WL_CONNECTED) {
193 LOGE("Wifi not connected");
194 return false;
195 }
196 WiFi.setSleep(false);
197 bytes_received = 0;
198 this->available_active = false;
199 // connect to target
200 if (!udp.listen(cfg.udp_port)) {
201 LOGE("Could not connect to '%s:%d' target", toString(cfg.target_ip),
202 cfg.udp_port);
203 }
204 // handle data
205 udp.onPacket([this](AsyncUDPPacket packet) { receive_udp(packet); });
206
207 return true;
208 }
209
211 int rate = vban_sample_rate();
212 if (rate < 0) {
213 LOGE("Invalid sample rate: %d", cfg.sample_rate);
214 return false;
215 }
217 return true;
218 }
219
220 void start_wifi() {
221 if (cfg.ssid == nullptr) return;
222 if (cfg.password == nullptr) return;
223 LOGI("ssid %s", cfg.ssid);
224 // Setup Wifi:
225 WiFi.begin(cfg.ssid, cfg.password); // Connect to your WiFi router
226 while (WiFi.status() != WL_CONNECTED) { // Wait for connection
227 delay(500);
228 Serial.print(".");
229 }
230 Serial.println();
231
232 LOGI("Wifi connected to IP (%d.%d.%d.%d)", WiFi.localIP()[0],
233 WiFi.localIP()[1], WiFi.localIP()[2], WiFi.localIP()[3]);
234 }
235
237 // Set vban packet header, counter, and data frame pointers to respective
238 // parts of packet:
239 vban.hdr = (VBanHeader*)&vban.packet[0];
242 (uint8_t*)&vban
244
245 // Setup the packet header:
246 strncpy(vban.hdr->preamble, "VBAN", 4);
248 static_cast<int>(VBAN_PROTOCOL_AUDIO) |
249 rate; // 11025 Hz, which matches default sample rate for soundmodem
251 (VBAN_PACKET_NUM_SAMPLES / cfg.channels) - 1; // 255 = 256 samples
252 vban.hdr->num_channels = cfg.channels - 1; // 0 = 1 channel
254 static_cast<int>(VBAN_BITFMT_16_INT) | VBAN_CODEC_PCM; // int16 PCM
257
259 (vban.hdr->num_samples + 1) * (vban.hdr->num_channels + 1) *
264 }
265
267 int result = -1;
268 switch (cfg.sample_rate) {
269 case 6000:
270 result = SAMPLE_RATE_6000_HZ;
271 break;
272 case 12000:
273 result = SAMPLE_RATE_12000_HZ;
274 break;
275 case 24000:
276 result = SAMPLE_RATE_24000_HZ;
277 break;
278 case 48000:
279 result = SAMPLE_RATE_48000_HZ;
280 break;
281 case 96000:
282 result = SAMPLE_RATE_96000_HZ;
283 break;
284 case 192000:
285 result = SAMPLE_RATE_192000_HZ;
286 break;
287 case 384000:
288 result = SAMPLE_RATE_384000_HZ;
289 break;
290 case 8000:
291 result = SAMPLE_RATE_8000_HZ;
292 break;
293 case 16000:
294 result = SAMPLE_RATE_16000_HZ;
295 break;
296 case 32000:
297 result = SAMPLE_RATE_32000_HZ;
298 break;
299 case 64000:
300 result = SAMPLE_RATE_64000_HZ;
301 break;
302 case 128000:
303 result = SAMPLE_RATE_128000_HZ;
304 break;
305 case 256000:
306 result = SAMPLE_RATE_256000_HZ;
307 break;
308 case 512000:
309 result = SAMPLE_RATE_512000_HZ;
310 break;
311 case 11025:
312 result = SAMPLE_RATE_11025_HZ;
313 break;
314 case 22050:
315 result = SAMPLE_RATE_22050_HZ;
316 break;
317 case 44100:
318 result = SAMPLE_RATE_44100_HZ;
319 break;
320 case 88200:
321 result = SAMPLE_RATE_88200_HZ;
322 break;
323 case 176400:
324 result = SAMPLE_RATE_176400_HZ;
325 break;
326 case 352800:
327 result = SAMPLE_RATE_352800_HZ;
328 break;
329 case 705600:
330 result = SAMPLE_RATE_705600_HZ;
331 break;
332 }
333 return result;
334 }
335
336 const char* toString(IPAddress adr) {
337 static char str[11] = {0};
338 snprintf(str, 11, "%d.%d.%d.%d", adr[0], adr[1], adr[2], adr[3]);
339 return str;
340 }
341
362 size_t bytesOut;
363
364 int len = packet.length();
365 if (len > 0) {
366 LOGD("receive_udp %d", len);
367 uint8_t* udpIncomingPacket = packet.data();
368
369 // receive incoming UDP packet
370 // Check if packet length meets VBAN specification:
371 if (len < VBAN_PACKET_HEADER_BYTES) {
372 LOGE("Too short to be VBAN (%u bytes)", len);
373 return;
374 }
375
376 // Check if preamble matches VBAN format:
377 if (strncmp("VBAN", (const char*)udpIncomingPacket, 4) != 0) {
378 LOGE("Unrecognized preamble %.4s", udpIncomingPacket);
379 return;
380 }
381
383
384 if (protocol == VBAN_PROTOCOL_SERVICE) {
385 // Allow up to ~1024 bytes for service packets like Ping0
386 if (len > 1024) {
387 LOGE("Service packet length invalid: %u bytes", len);
388 return;
389 }
390 } else {
391 // Audio, serial, etc
393 LOGE("Audio/other packet length invalid: %u bytes", len);
395 return;
396 }
397 }
398
399 //LOGI("VBAN format byte: 0x%02X", udpIncomingPacket[7]);
400 //LOGD("VBAN protocol mask applied: 0x%02X", udpIncomingPacket[7] & VBAN_PROTOCOL_MASK);
401 //Serial.printf("Header[7] = 0x%02X\n", udpIncomingPacket[7]);
402
403
404 //-------------------------------------------------------------------------
405 //SUPPORT PING REQUEST
406 if ( protocol == VBAN_PROTOCOL_SERVICE ) {
407
410
414
415 if (!isReply && function == 0) {
416 LOGI("Received VBAN PING0 request");
417 sendVbanPing0Reply(packet);
418 }
419 }
420 return;
421 }
422 //--------------------------------------------------------------------------
423
436
437 //LOGD("sample_count: %d - frames: %d", vban_rx_sample_count, vbframes);
438 //assert (vban_rx_sample_count == vbframes*vbchannels);
439
440 // E.g. do not process any text
441 if (vbformat != cfg.format){
442 LOGE("Format ignored: 0x%x", vbformat);
443 return;
444 }
445
446 // Currently we support only 16 bits.
448 LOGE("Format only 16 bits supported");
449 return;
450 }
451
452 // Just to be safe, re-check sample count against max sample count to
453 // avoid overrunning outBuf later
455 LOGE("unexpected packet size: %u", vban_rx_sample_count);
456 return;
457 }
458
459 // update sample rate
461 // update audio info
465 // remove any buffered data
467 available_active = false;
468 }
469
470 if (p_out!=nullptr){
473 LOGE("buffer overflow %d -> %d", vban_rx_data_bytes, size_written);
474 }
475 return;
476 }
477
478 // write data to buffer
481 LOGE("buffer overflow %d -> %d", vban_rx_data_bytes, size_written);
482 }
483
484 // report available bytes only when buffer is 50% full
485 if (!available_active) {
488 available_active = true;
489 LOGI("Activating vban");
490 }
491 }
492 }
493 }
494//-------------------------------------------------------------------------------------
495 //implement ping reply based on VBAN standard
497
498 // Prepare VBAN 28-byte service header
499 uint8_t header[28];
500 memset(header, 0, sizeof(header));
501 memcpy(header, "VBAN", 4);
502 header[4] = VBAN_PROTOCOL_SERVICE;
503 header[5] = VBAN_SERVICE_FNCT_PING0 | VBAN_SERVICE_FNCT_REPLY; // Service function + reply bit
504 header[6] = 0x00; // must be zero
505 // Copy incoming stream name from discovery packet
506 const uint8_t* data = sourcePacket.data();
507 memcpy(&header[8], &data[8], 16);
508 // Copy frame number (little endian)
509
510 uint32_t frameNumber = (uint32_t)((data[24] & 0xFF) | ((data[25] & 0xFF) << 8) | ((data[26] & 0xFF) << 16) | ((data[27] & 0xFF) << 24));
511 memcpy(&header[24], &frameNumber, 4);
512
513 // Construct the PING0 payload using the struct
515 memset(&ping0, 0, sizeof(ping0));
516
517 // Fill fields with your config data and fixed values
518 ping0.bitType = cfg.device_flags;
519 ping0.bitfeature = cfg.bitfeature;
520 ping0.bitfeatureEx = 0x00000000;
521 ping0.PreferedRate = 44100;
522 ping0.MinRate = 8000;
523 ping0.MaxRate = 96000;
524 ping0.color_rgb = cfg.device_color;
525
526 // Version string, 8 bytes total (zero padded)
527 memcpy(ping0.nVersion, "v1.0", 4);
528
529 // GPS_Position left empty (all zero), so no need to set
530 // USER_Position 8 bytes
531 memcpy(ping0.USER_Position, "USRPOS", 6);
532 // LangCode_ascii 8 bytes ("EN" + padding)
533 memset(ping0.LangCode_ascii, 0, sizeof(ping0.LangCode_ascii));
534 memcpy(ping0.LangCode_ascii, "EN", 2);
535 // reserved_ascii and reservedEx are zeroed by memset
536 // IP as string, max 32 bytes
537
538 char ipStr[16]; // Enough for "255.255.255.255\0"
539 sprintf(ipStr, "%d.%d.%d.%d", WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], WiFi.localIP()[3]);
540 safe_strncpy(ping0.DistantIP_ascii, ipStr, sizeof(ping0.DistantIP_ascii));
541 // Ports (network byte order)
542
543 ping0.DistantPort = cfg.udp_port; //returs port I am listening for VBAN - more useful then UDP ephemeral port
544 ping0.DistantReserved = 0;
545
546 // Device name (64 bytes)
547 if (cfg.device_name && cfg.device_name[0] != '\0') {
548 safe_strncpy(ping0.DeviceName_ascii, cfg.device_name, sizeof(ping0.DeviceName_ascii));
549 } else {
550 uint8_t mac[6];
551 WiFi.macAddress(mac);
552 char macStr[64];
553 snprintf(macStr, sizeof(macStr), "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
554 safe_strncpy(ping0.DeviceName_ascii, macStr, sizeof(ping0.DeviceName_ascii));
555 }
556
557 // Manufacturer name (64 bytes)
558 safe_strncpy(ping0.ManufacturerName_ascii, cfg.manufacturer_name, sizeof(ping0.ManufacturerName_ascii));
559 // Application name (64 bytes)
560 safe_strncpy(ping0.ApplicationName_ascii, cfg.application_name, sizeof(ping0.ApplicationName_ascii));
561 // Host name (64 bytes)
562 const char* hostName = cfg.host_name;
563 if (!hostName || hostName[0] == '\0') {
564 hostName = WiFi.getHostname();
565 if (!hostName) hostName = "ESP32";
566 }
567 safe_strncpy(ping0.HostName_ascii, hostName, sizeof(ping0.HostName_ascii));
568
569 // UserName_utf8
570 safe_strncpy(ping0.UserName_utf8, cfg.user_name, sizeof(ping0.UserName_utf8));
571 //UserComment_utf8
572 safe_strncpy(ping0.UserComment_utf8, cfg.user_comment, sizeof(ping0.UserComment_utf8));
573
574 // Prepare final packet: header + payload
575 uint8_t packet[28 + sizeof(VBAN_PING0)];
576 memcpy(packet, header, 28);
577 memcpy(packet + 28, &ping0, sizeof(VBAN_PING0));
578
579 // Send UDP packet
580 udp.writeTo(packet, sizeof(packet), sourcePacket.remoteIP(), sourcePacket.remotePort());
581}
582
583 // Safely copy a C-string with guaranteed null termination
584 void safe_strncpy(char* dest, const char* src, size_t dest_size) {
585 if (dest_size == 0) return;
586 strncpy(dest, src, dest_size - 1);
587 dest[dest_size - 1] = '\0';
588 }
589 //-----------------------------------------------------------------------------------
590};
591
592} // namespace audio_tools
#define TRACED()
Definition AudioLoggerIDF.h:31
#define LOGI(...)
Definition AudioLoggerIDF.h:28
#define LOGD(...)
Definition AudioLoggerIDF.h:27
#define LOGE(...)
Definition AudioLoggerIDF.h:30
#define DEFAULT_BUFFER_SIZE
Definition avr.h:20
Base class for all Audio Streams. It support the boolean operator to test if the object is ready with...
Definition BaseStream.h:123
AudioInfo info
Definition BaseStream.h:174
virtual void setAudioInfo(AudioInfo newInfo) override
Defines the input AudioInfo.
Definition BaseStream.h:131
Buffer implementation which is using a FreeRTOS StreamBuffer. The default allocator uses psram is ava...
Definition BufferRTOS.h:30
int available() override
provides the number of entries that are available to read
Definition BufferRTOS.h:148
void setReadMaxWait(TickType_t ticks)
Definition BufferRTOS.h:62
int writeArray(const T data[], int len)
Fills the buffer data.
Definition BufferRTOS.h:97
bool resize(size_t size)
Re-Allocats the memory and the queue.
Definition BufferRTOS.h:51
void reset() override
clears the buffer
Definition BufferRTOS.h:142
int readArray(T data[], int len)
reads multiple values
Definition BufferRTOS.h:77
A lock free N buffer. If count=2 we create a DoubleBuffer, if count=3 a TripleBuffer etc.
Definition Buffers.h:663
Definition NoArduino.h:62
virtual size_t write(const uint8_t *data, size_t len)
Definition NoArduino.h:126
A simple Buffer implementation which just uses a (dynamically sized) array.
Definition Buffers.h:172
bool write(T sample) override
write add an entry to the buffer
Definition Buffers.h:206
int availableForWrite() override
provides the number of entries that are available to write
Definition Buffers.h:238
bool resize(int size)
Resizes the buffer if supported: returns false if not supported.
Definition Buffers.h:305
T * data()
Provides address of actual data.
Definition Buffers.h:284
void reset() override
clears the buffer
Definition Buffers.h:286
Throttle the sending or receiving of the audio data to limit it to the indicated sample rate.
Definition AudioStreams.h:1050
void delayFrames(size_t frames)
Definition AudioStreams.h:1130
bool begin(ThrottleConfig cfg)
Definition AudioStreams.h:1070
ThrottleConfig defaultConfig()
Definition AudioStreams.h:1065
Definition VBANStream.h:11
bool throttle_active
Definition VBANStream.h:31
const char * user_comment
Definition VBANStream.h:50
const char * ssid
ssid for wifi connection
Definition VBANStream.h:26
uint32_t device_flags
Definition VBANStream.h:41
const char * device_name
Definition VBANStream.h:45
uint8_t format
Definition VBANStream.h:38
uint32_t bitfeature
Definition VBANStream.h:42
int rx_buffer_count
Definition VBANStream.h:29
uint16_t udp_port
default port is 6980
Definition VBANStream.h:22
IPAddress target_ip
Use {0,0,0,0}; as broadcast address.
Definition VBANStream.h:24
const char * application_name
Definition VBANStream.h:47
const char * password
password for wifi connection
Definition VBANStream.h:28
const char * manufacturer_name
Definition VBANStream.h:46
const char * user_name
Definition VBANStream.h:49
int throttle_correction_us
Definition VBANStream.h:34
RxTxMode mode
Definition VBANStream.h:18
const char * stream_name
name of the stream
Definition VBANStream.h:20
const char * host_name
Definition VBANStream.h:48
int max_write_size
Definition VBANStream.h:36
VBANConfig()
Definition VBANStream.h:13
uint32_t device_color
Definition VBANStream.h:43
VBAN Audio Source and Sink for the ESP32. For further details please see https://vb-audio....
Definition VBANStream.h:63
void start_wifi()
Definition VBANStream.h:220
bool begin_tx()
Definition VBANStream.h:175
uint32_t packet_counter
Definition VBANStream.h:169
void sendVbanPing0Reply(AsyncUDPPacket &sourcePacket)
Definition VBANStream.h:496
void safe_strncpy(char *dest, const char *src, size_t dest_size)
Definition VBANStream.h:584
const IPAddress broadcast_address
Definition VBANStream.h:158
bool configure_tx()
Definition VBANStream.h:210
void configure_vban(VBanSampleRates rate)
Definition VBANStream.h:236
void receive_udp(AsyncUDPPacket &packet)
VBAN adjusts the number of samples per packet according to sample rate. Assuming 16-bit PCM mono,...
Definition VBANStream.h:357
int available()
Definition VBANStream.h:155
size_t bytes_received
Definition VBANStream.h:171
size_t readBytes(uint8_t *data, size_t len) override
Definition VBANStream.h:146
SingleBuffer< int16_t > tx_buffer
Definition VBANStream.h:162
bool begin()
Definition VBANStream.h:93
int vban_sample_rate()
Definition VBANStream.h:266
size_t write(const uint8_t *data, size_t len) override
Definition VBANStream.h:112
VBan vban
Definition VBANStream.h:160
bool begin(VBANConfig cfg)
Definition VBANStream.h:87
int availableForWrite()
Definition VBANStream.h:144
Print * p_out
Definition VBANStream.h:173
VBANConfig defaultConfig(RxTxMode mode=TX_MODE)
Definition VBANStream.h:65
AsyncUDP udp
Definition VBANStream.h:159
bool begin_rx()
Definition VBANStream.h:190
const char * toString(IPAddress adr)
Definition VBANStream.h:336
void setAudioInfo(AudioInfo info) override
Defines the input AudioInfo.
Definition VBANStream.h:75
BufferRTOS< uint8_t > rx_buffer
Definition VBANStream.h:164
bool available_active
Definition VBANStream.h:172
void setOutput(Print &out)
Definition VBANStream.h:71
VBANConfig cfg
Definition VBANStream.h:161
bool udp_connected
Definition VBANStream.h:168
Throttle throttle
Definition VBANStream.h:170
RxTxMode
The Microcontroller is the Audio Source (TX_MODE) or Audio Sink (RX_MODE). RXTX_MODE is Source and Si...
Definition AudioTypes.h:30
@ TX_MODE
Definition AudioTypes.h:30
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition AudioCodecsBase.h:10
void delay(unsigned long ms)
Definition Time.h:23
static HardwareSerial Serial
Definition NoArduino.h:186
size_t writeData(Print *p_out, T *data, int samples, int maxSamples=512)
Definition AudioTypes.h:512
Definition vban.h:179
Definition vban.h:51
uint8_t num_channels
Definition vban.h:55
uint8_t sample_format
Definition vban.h:56
char stream_name[16]
Definition vban.h:57
uint8_t num_samples
Definition vban.h:54
char preamble[4]
Definition vban.h:52
uint8_t sample_rate
Definition vban.h:53
Definition vban.h:61
uint16_t packet_total_bytes
Definition vban.h:67
uint8_t * data_frame
Definition vban.h:64
uint8_t packet[1464]
Definition vban.h:65
uint32_t * packet_counter
Definition vban.h:63
uint16_t packet_data_bytes
Definition vban.h:66
VBanHeader * hdr
Definition vban.h:62
Basic Audio information which drives e.g. I2S.
Definition AudioTypes.h:55
void copyFrom(AudioInfo info)
Same as set.
Definition AudioTypes.h:105
sample_rate_t sample_rate
Sample Rate: e.g 44100.
Definition AudioTypes.h:57
uint16_t channels
Number of channels: 2=stereo, 1=mono.
Definition AudioTypes.h:59
uint8_t bits_per_sample
Number of bits per sample (int16_t = 16 bits)
Definition AudioTypes.h:61
#define VBAN_SERVICE_FNCT_REPLY
Definition vban.h:177
#define VBAN_PROTOCOL_SERVICE
Definition vban.h:167
#define VBAN_SR_MASK
Definition vban.h:73
#define VBAN_PACKET_COUNTER_BYTES
Definition vban.h:46
VBanSampleRates
Definition vban.h:83
@ SAMPLE_RATE_384000_HZ
Definition vban.h:90
@ SAMPLE_RATE_8000_HZ
Definition vban.h:91
@ SAMPLE_RATE_6000_HZ
Definition vban.h:84
@ SAMPLE_RATE_44100_HZ
Definition vban.h:100
@ SAMPLE_RATE_256000_HZ
Definition vban.h:96
@ SAMPLE_RATE_176400_HZ
Definition vban.h:102
@ SAMPLE_RATE_128000_HZ
Definition vban.h:95
@ SAMPLE_RATE_88200_HZ
Definition vban.h:101
@ SAMPLE_RATE_11025_HZ
Definition vban.h:98
@ SAMPLE_RATE_16000_HZ
Definition vban.h:92
@ SAMPLE_RATE_12000_HZ
Definition vban.h:85
@ SAMPLE_RATE_192000_HZ
Definition vban.h:89
@ SAMPLE_RATE_32000_HZ
Definition vban.h:93
@ SAMPLE_RATE_352800_HZ
Definition vban.h:103
@ SAMPLE_RATE_22050_HZ
Definition vban.h:99
@ SAMPLE_RATE_705600_HZ
Definition vban.h:104
@ SAMPLE_RATE_24000_HZ
Definition vban.h:86
@ SAMPLE_RATE_512000_HZ
Definition vban.h:97
@ SAMPLE_RATE_64000_HZ
Definition vban.h:94
@ SAMPLE_RATE_48000_HZ
Definition vban.h:87
@ SAMPLE_RATE_96000_HZ
Definition vban.h:88
#define VBAN_BIT_RESOLUTION_MASK
Definition vban.h:120
#define VBAN_SERVICE_IDENTIFICATION
Definition vban.h:170
#define VBAN_PACKET_NUM_SAMPLES
Definition vban.h:43
@ VBAN_CODEC_PCM
Definition vban.h:144
#define VBAN_STREAM_NAME_SIZE
Definition vban.h:35
@ VBAN_BITFMT_16_INT
Definition vban.h:124
#define VBAN_PROTOCOL_MASK
Definition vban.h:108
#define VBAN_SERVICE_FNCT_PING0
Definition vban.h:176
#define VBAN_PACKET_MAX_SAMPLES
Definition vban.h:44
static long const VBanSRList[21]
Definition vban.h:75
@ VBAN_PROTOCOL_AUDIO
Definition vban.h:111
#define VBAN_PACKET_MAX_LEN_BYTES
Definition vban.h:47
#define VBAN_PACKET_HEADER_BYTES
Definition vban.h:45