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