5757
5858void setup_i2s (void );
5959bool i2s_write_stereo_samples_buff (const float * fl_sample , const float * fr_sample , const int buffLen );
60- bool i2s_write_stereo_samples_buff (uint8_t stream_id , const float * fl_sample , const float * fr_sample , const int buffLen , uint8_t codec_num );
60+ bool i2s_write_stereo_samples_buff (uint8_t stream_id , const float * fl_sample , const float * fr_sample , const int buffLen );
6161bool i2s_write_stereo_samples_i16 (const int16_t * fl_sample , const int16_t * fr_sample , const int buffLen );
6262bool i2s_write_stereo_samples_i16 (uint8_t stream_id , const int16_t * fl_sample , const int16_t * fr_sample , const int buffLen );
6363void i2s_read_stereo_samples_buff (float * fl_sample , float * fr_sample , const int buffLen );
6464void i2s_read_stereo_samples_buff (int16_t * fl_sample , int16_t * fr_sample , const int buffLen );
6565void i2s_read_stereo_samples_buff (uint8_t stream_id , float * fl_sample , float * fr_sample , const int buffLen );
66- void i2s_read_stereo_samples_i16 (uint8_t stream_id , int16_t * fl_sample , int16_t * fr_sample , const int buffLen );
66+ void i2s_read_stereo_samples_buff (uint8_t stream_id , int16_t * fl_sample , int16_t * fr_sample , const int buffLen );
6767
6868#endif /* ML_SYNTH_INLINE_DECLARATION */
6969
@@ -147,7 +147,7 @@ union sampleTUNT
147147//#define I2S_NODAC
148148
149149
150- const i2s_port_t i2s_port_number [] =
150+ i2s_port_t i2s_port_number [] =
151151{
152152 I2S_NUM_0 ,
153153#ifdef DUAL_CODEC_ENABLED
@@ -263,7 +263,6 @@ bool i2s_write_stereo_samples_i16(const int16_t *fl_sample, const int16_t *fr_sa
263263bool i2s_write_stereo_samples_i16 (uint8_t stream_id , const int16_t * fl_sample , const int16_t * fr_sample , const int buffLen )
264264{
265265 size_t bytes_written = 0 ;
266- i2s_port_t target_port = i2s_port_number [stream_id ];
267266 static union sampleTUNT sampleDataU [SAMPLE_BUFFER_SIZE ];
268267
269268#ifdef OUTPUT_SAW_TEST
@@ -283,7 +282,7 @@ bool i2s_write_stereo_samples_i16(uint8_t stream_id, const int16_t *fl_sample, c
283282#ifdef CYCLE_MODULE_ENABLED
284283 calcCycleCountPre ();
285284#endif
286- i2s_write (target_port , (const char * )& sampleDataU [0 ].sample , 2 * BYTES_PER_SAMPLE * buffLen , & bytes_written , portMAX_DELAY );
285+ i2s_write (i2s_port_number [ stream_id ] , (const char * )& sampleDataU [0 ].sample , 2 * BYTES_PER_SAMPLE * buffLen , & bytes_written , portMAX_DELAY );
287286#ifdef CYCLE_MODULE_ENABLED
288287 calcCycleCount ();
289288#endif
0 commit comments