File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
ports/nrf/common-hal/audiobusio Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,10 @@ void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t* self,
250
250
NRF_I2S -> CONFIG .SWIDTH = self -> bytes_per_sample == 1
251
251
? I2S_CONFIG_SWIDTH_SWIDTH_8Bit
252
252
: I2S_CONFIG_SWIDTH_SWIDTH_16Bit ;
253
+ NRF_I2S -> CONFIG .CHANNELS = self -> channel_count == 1
254
+ ? I2S_CONFIG_CHANNELS_CHANNELS_Left
255
+ : I2S_CONFIG_CHANNELS_CHANNELS_Stereo ;
256
+
253
257
choose_i2s_clocking (self , sample_rate );
254
258
/* Allocate buffers based on a maximum duration
255
259
* This duration was chosen empirically based on what would
@@ -273,9 +277,6 @@ void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t* self,
273
277
self -> stopping = false;
274
278
i2s_buffer_fill (self );
275
279
276
- NRF_I2S -> CONFIG .CHANNELS = self -> channel_count == 1 ? I2S_CONFIG_CHANNELS_CHANNELS_Left : I2S_CONFIG_CHANNELS_CHANNELS_Stereo ;
277
-
278
-
279
280
NRF_I2S -> RXTXD .MAXCNT = self -> buffer_length / 4 ;
280
281
NRF_I2S -> ENABLE = I2S_ENABLE_ENABLE_Enabled ;
281
282
You can’t perform that action at this time.
0 commit comments