Skip to content

Commit

Permalink
Compile error for 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Apr 3, 2024
1 parent a6e38a5 commit d01e1bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/BluetoothA2DPSinkQueued.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ size_t BluetoothA2DPSinkQueued::write_audio(const uint8_t *data, size_t size)

if (ringbuffer_mode == RINGBUFFER_MODE_DROPPING) {
ESP_LOGW(BT_APP_TAG, "ringbuffer is full, drop this packet!");
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
vRingbufferGetInfo(s_ringbuf_i2s, NULL, NULL, NULL, NULL, &item_size);
#else
vRingbufferGetInfo(s_ringbuf_i2s, NULL, NULL, NULL, &item_size);
#endif
if (item_size <= i2s_ringbuffer_prefetch_size()) {
ESP_LOGI(BT_APP_TAG, "ringbuffer data decreased! mode changed: RINGBUFFER_MODE_PROCESSING");
ringbuffer_mode = RINGBUFFER_MODE_PROCESSING;
Expand All @@ -115,7 +119,12 @@ size_t BluetoothA2DPSinkQueued::write_audio(const uint8_t *data, size_t size)
}

if (ringbuffer_mode == RINGBUFFER_MODE_PREFETCHING) {
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)
vRingbufferGetInfo(s_ringbuf_i2s, NULL, NULL, NULL, NULL, &item_size);
#else
vRingbufferGetInfo(s_ringbuf_i2s, NULL, NULL, NULL, &item_size);
#endif

if (item_size >= i2s_ringbuffer_prefetch_size()) {
ESP_LOGI(BT_APP_TAG, "ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING");
ringbuffer_mode = RINGBUFFER_MODE_PROCESSING;
Expand Down

0 comments on commit d01e1bb

Please sign in to comment.