don't parse dmap unknown fields

This commit is contained in:
philippe44
2023-06-02 16:19:03 +02:00
parent 79164da5f6
commit 5fd09e2a34
2 changed files with 4 additions and 3 deletions

View File

@@ -424,7 +424,7 @@ static int dmap_parse_internal(const dmap_settings *settings, const char *buf, s
/* Make a best guess of the type */ /* Make a best guess of the type */
field_type = DMAP_UNKNOWN; field_type = DMAP_UNKNOWN;
field_name = code; field_name = code;
#ifdef DMAP_FULL
if (field_len >= 8) { if (field_len >= 8) {
/* Look for a four char code followed by a length within the current field */ /* Look for a four char code followed by a length within the current field */
if (isalpha(p[0] & 0xff) && if (isalpha(p[0] & 0xff) &&
@@ -448,6 +448,7 @@ static int dmap_parse_internal(const dmap_settings *settings, const char *buf, s
field_type = is_string ? DMAP_STR : DMAP_UINT; field_type = is_string ? DMAP_STR : DMAP_UINT;
} }
#endif
} }
switch (field_type) { switch (field_type) {

View File

@@ -283,8 +283,8 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
i2s_config.dma_buf_count = DMA_BUF_COUNT * 2; i2s_config.dma_buf_count = DMA_BUF_COUNT * 2;
/* /*
In DMA, we have room for (LEN * COUNT) frames of 32 bits samples that In DMA, we have room for (LEN * COUNT) frames of 32 bits samples that
we push at sample_rate * 2. Each of these peuso-frames is a single true we push at sample_rate * 2. Each of these pseudo-frames is a single true
audio frame. So the real depth is true frames is (LEN * COUNT / 2) audio frame. So the real depth in true frames is (LEN * COUNT / 2)
*/ */
dma_buf_frames = DMA_BUF_COUNT * DMA_BUF_LEN / 2; dma_buf_frames = DMA_BUF_COUNT * DMA_BUF_LEN / 2;