Skip to content

Commit 3c0faeb

Browse files
committed
Additioinal log entries
1 parent f9afe4b commit 3c0faeb

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/AudioExperiments/AudioSPDIF.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class SPDIFOutI2S : public SPDIFOut {
147147
I2SConfig i2s_cfg;
148148
i2s_cfg.sample_rate = sample_rate;
149149
i2s_cfg.channels = cfg.channels;
150-
i2s_cfg.bits_per_sample = 32;
150+
i2s_cfg.bits_per_sample = I2S_BITS_PER_SAMPLE;
151151
i2s_cfg.pin_ws = -1;
152152
i2s_cfg.pin_bck = -1;
153153
i2s_cfg.pin_data = cfg.pin_data;
@@ -394,8 +394,10 @@ class SPDIFStream : public AudioStreamX {
394394
// Define output class if not yet defined
395395
if (spdif_out == nullptr) {
396396
#if USE_ESP32_I2S == 1
397+
LOGI("USE_ESP32_I2S=1 -> using SPDFOutI2SESP32()");
397398
spdif_out = new SPDFOutI2SESP32();
398399
#else
400+
LOGI("USE_ESP32_I2S==%d -> using SPDIFOutI2S()",USE_ESP32_I2S);
399401
spdif_out = new SPDIFOutI2S();
400402
#endif
401403
spdif.setOutput(spdif_out);

src/AudioI2S/I2SESP32.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ class I2SBase {
104104
this->i2s_num = (i2s_port_t) cfg.port_no;
105105
setChannels(cfg.channels);
106106

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+
107111
i2s_config_t i2s_config_new = {
108112
.mode = toMode(cfg),
109113
.sample_rate = (eps32_i2s_sample_rate_type)cfg.sample_rate,
@@ -116,7 +120,6 @@ class I2SBase {
116120
.use_apll = (bool) cfg.use_apll,
117121
.tx_desc_auto_clear = I2S_AUTO_CLEAR,
118122
.fixed_mclk = (int) (cfg.use_apll ? cfg.fixed_mclk : 0 )
119-
120123
};
121124
i2s_config = i2s_config_new;
122125

src/AudioTools/AudioCopy.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class StreamCopyT {
5050
}
5151

5252
void begin(){
53-
is_first = true;
53+
is_first = true;
54+
LOG("buffer_size=%d",buffer_size);
5455
}
5556

5657
void end() {
@@ -62,13 +63,15 @@ class StreamCopyT {
6263
this->from = new AudioStreamWrapper(from);
6364
this->to = &to;
6465
is_first = true;
66+
LOG("buffer_size=%d",buffer_size);
6567
}
6668

6769
// assign a new output and input stream
6870
void begin(Print &to, AudioStream &from){
6971
this->from = &from;
7072
this->to = &to;
7173
is_first = true;
74+
LOG("buffer_size=%d",buffer_size);
7275
}
7376

7477
Stream *getFrom(){

0 commit comments

Comments
 (0)