Skip to content

Commit fc53d26

Browse files
committed
Extended Logging
1 parent 350c5d2 commit fc53d26

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/AudioTools/AudioCopy.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class StreamCopyT {
5252
// copies the data from one channel from the source to 2 channels on the destination - the result is in bytes
5353
size_t copy(){
5454
size_t result = 0;
55-
uint16_t delayCount = 0;
55+
size_t delayCount = 0;
5656
size_t len = available();
5757
size_t bytes_to_read;
5858

@@ -63,7 +63,7 @@ class StreamCopyT {
6363
size_t bytes_read = from->readBytes(buffer, bytes_to_read);
6464
result = write(bytes_read, delayCount);
6565
}
66-
LOGI("StreamCopy::copy %zu -> %zu -> %zu bytes - in %d hops", bytes_to_read, bytes_read, result, delayCount);
66+
LOGI("StreamCopy::copy %zu -> %zu -> %zu bytes - in %zu hops", bytes_to_read, bytes_read, result, delayCount);
6767
return result;
6868
}
6969

@@ -158,7 +158,7 @@ class StreamCopy : public StreamCopyT<uint8_t> {
158158
template<typename T>
159159
size_t copy(BaseConverter<T> &converter) {
160160
size_t result = available();
161-
uint16_t delayCount = 0;
161+
size_t delayCount = 0;
162162

163163
BaseConverter<T> *coverter_ptr = &converter;
164164
if (result>0){
@@ -169,7 +169,7 @@ class StreamCopy : public StreamCopyT<uint8_t> {
169169
write(result, delayCount);
170170
}
171171

172-
LOGI("StreamCopy::copy %zu bytes - in %d hops", result, delayCount);
172+
LOGI("StreamCopy::copy %zu bytes - in %zu hops", result, delayCount);
173173
return result;
174174
}
175175

src/AudioTools/SoundGenerator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class SoundGenerator {
5858
result = readSamples((T(*)[2]) buffer, lengthBytes / frame_size);
5959
break;
6060
default:
61-
LOGE( "SoundGenerator::readBytes -> number of channels %d is not supported (use 1 or 2)\n", channels);
61+
LOGE( "SoundGenerator::readBytes -> number of channels %d is not supported (use 1 or 2)", channels);
6262
result = 0;
6363
break;
6464
}
@@ -70,7 +70,7 @@ class SoundGenerator {
7070
// when inactive did not generate anything
7171
result = 0;
7272
}
73-
LOGD( "SoundGenerator::readBytes (channels: %d) %d bytes -> %d samples \n",channels, lengthBytes,result);
73+
LOGD( "SoundGenerator::readBytes (channels: %d) %zu bytes -> %zu samples", channels, lengthBytes, result);
7474
return result * frame_size;
7575
}
7676

0 commit comments

Comments
 (0)