File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ bool ICACHE_FLASH_ATTR i2s_is_empty(){
6565 return (i2s_slc_queue_len >= SLC_BUF_CNT - 1 );
6666}
6767
68+ int16_t ICACHE_FLASH_ATTR i2s_available (){
69+ return (SLC_BUF_CNT - i2s_slc_queue_len ) * SLC_BUF_LEN ;
70+ }
71+
6872uint32_t ICACHE_FLASH_ATTR i2s_slc_queue_next_item (){ //pop the top off the queue
6973 uint8_t i ;
7074 uint32_t item = i2s_slc_queue [0 ];
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ bool i2s_write_sample_nb(uint32_t sample);//same as above but does not block whe
4848bool i2s_write_lr (int16_t left , int16_t right );//combines both channels and calls i2s_write_sample with the result
4949bool i2s_is_full ();//returns true if DMA is full and can not take more bytes (overflow)
5050bool i2s_is_empty ();//returns true if DMA is empty (underflow)
51+ int16_t i2s_available ();// returns the number of samples than can be written before blocking
5152
5253#ifdef __cplusplus
5354}
You can’t perform that action at this time.
0 commit comments