File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ class SPDIFOutI2S : public SPDIFOut {
147
147
I2SConfig i2s_cfg;
148
148
i2s_cfg.sample_rate = sample_rate;
149
149
i2s_cfg.channels = cfg.channels ;
150
- i2s_cfg.bits_per_sample = 32 ;
150
+ i2s_cfg.bits_per_sample = I2S_BITS_PER_SAMPLE ;
151
151
i2s_cfg.pin_ws = -1 ;
152
152
i2s_cfg.pin_bck = -1 ;
153
153
i2s_cfg.pin_data = cfg.pin_data ;
@@ -394,8 +394,10 @@ class SPDIFStream : public AudioStreamX {
394
394
// Define output class if not yet defined
395
395
if (spdif_out == nullptr ) {
396
396
#if USE_ESP32_I2S == 1
397
+ LOGI (" USE_ESP32_I2S=1 -> using SPDFOutI2SESP32()" );
397
398
spdif_out = new SPDFOutI2SESP32 ();
398
399
#else
400
+ LOGI (" USE_ESP32_I2S==%d -> using SPDIFOutI2S()" ,USE_ESP32_I2S);
399
401
spdif_out = new SPDIFOutI2S ();
400
402
#endif
401
403
spdif.setOutput (spdif_out);
Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ class I2SBase {
104
104
this ->i2s_num = (i2s_port_t ) cfg.port_no ;
105
105
setChannels (cfg.channels );
106
106
107
+ LOGI (" I2S_BUFFER_COUNT=%d" ,I2S_BUFFER_COUNT);
108
+ LOGI (" I2S_BUFFER_SIZE=%d" ,I2S_BUFFER_SIZE);
109
+ LOGI (" I2S_AUTO_CLEAR=%d" ,I2S_AUTO_CLEAR);
110
+
107
111
i2s_config_t i2s_config_new = {
108
112
.mode = toMode (cfg),
109
113
.sample_rate = (eps32_i2s_sample_rate_type)cfg.sample_rate ,
@@ -116,7 +120,6 @@ class I2SBase {
116
120
.use_apll = (bool ) cfg.use_apll ,
117
121
.tx_desc_auto_clear = I2S_AUTO_CLEAR,
118
122
.fixed_mclk = (int ) (cfg.use_apll ? cfg.fixed_mclk : 0 )
119
-
120
123
};
121
124
i2s_config = i2s_config_new;
122
125
Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ class StreamCopyT {
50
50
}
51
51
52
52
void begin (){
53
- is_first = true ;
53
+ is_first = true ;
54
+ LOG (" buffer_size=%d" ,buffer_size);
54
55
}
55
56
56
57
void end () {
@@ -62,13 +63,15 @@ class StreamCopyT {
62
63
this ->from = new AudioStreamWrapper (from);
63
64
this ->to = &to;
64
65
is_first = true ;
66
+ LOG (" buffer_size=%d" ,buffer_size);
65
67
}
66
68
67
69
// assign a new output and input stream
68
70
void begin (Print &to, AudioStream &from){
69
71
this ->from = &from;
70
72
this ->to = &to;
71
73
is_first = true ;
74
+ LOG (" buffer_size=%d" ,buffer_size);
72
75
}
73
76
74
77
Stream *getFrom (){
You can’t perform that action at this time.
0 commit comments