| 1459 | |
| 1460 | #ifdef MODDEF_AUDIOOUT_AMPLIFIER_POWER |
| 1461 | static bool playedBuffer(i2s_chan_handle_t handle, i2s_event_data_t *event, void *user_ctx) |
| 1462 | { |
| 1463 | modAudioOut out = user_ctx; |
| 1464 | |
| 1465 | int bytesInFlight = __atomic_fetch_sub(&out->bytesInFlight, event->size, __ATOMIC_SEQ_CST); |
| 1466 | if (bytesInFlight <= event->size) { |
| 1467 | if (bytesInFlight >= 0) |
| 1468 | modGPIOWrite(&out->amplifierPower, 0); |
| 1469 | } |
| 1470 | |
| 1471 | return false; |
| 1472 | } |
| 1473 | #endif |
| 1474 | |
| 1475 | void audioOutLoop(void *pvParameter) |
nothing calls this directly
no test coverage detected