Closed fobi55 closed 3 days ago
I don't understand what the issue is. Please provide a description and a reproducible example! If you now how to correct it don't hesitate to submit a pull request
Hi, Sorry, I'm new to git. There was a typo error in the class ConverterSwitchLeftAndRight. In the 'problem description' section here I put the corrected class. I don't keep the original one. Cheers.
Sorry, I stll don't see it and this is impossible to compare! What line did you change ? Where is the missspelling ?
It was something like that:
sample = (sample + 1) *(sample + 1) = temp; sample += 2;
I changed it to:
sample = (sample + 1) ; (sample + 1) = temp; sample += 2;
Again, sorry, I'm new to the git. And I am HW engineer ... :)
Here, I found the ZIP file:
/**
@tparam T
*/
template
size_t convert(uint8_t src, size_t byte_count) override { if (channels == 2) { int size = byte_count / channels / sizeof(T); T sample = (T )src; for (size_t j = 0; j < size; j++) { T temp = sample; sample = (sample + 1) * (sample + 1) = temp; <<<<<<<<<<<<<<<<<<<<<<<<,, sample += 2; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< } } return byte_count; }
protected: int channels = 2; };
Apologies, my mistake. This should be as is: sample += 2;
`/**
@tparam T
*/
template
size_t convert(uint8_t src, size_t byte_count) override { if (channels == 2) { int size = byte_count / channels / sizeof(T); T sample = (T ) src; for (size_t j = 0; j < size; j++) { T temp = sample; sample = (sample + 1) ; *(sample + 1) = temp; sample += 2; } } return byte_count; }
protected: int channels = 2; };`
I see, somwhow a semicolon got deleted along the way. I committed the correction and added it back...
Problem Description
Typo error: `/**
@tparam T */ template
class ConverterSwitchLeftAndRight : public BaseConverter {
public:
ConverterSwitchLeftAndRight(int channels = 2) { this->channels = channels; }
size_t convert(uint8_t src, size_t byte_count) override { if (channels == 2) { int size = byte_count / channels / sizeof(T); T sample = (T ) src; for (size_t j = 0; j < size; j++) { T temp = sample; sample = (sample + 1) ; (sample + 1) = temp; sample += 2; } } return byte_count; }`
Device Description
NodeMCU-32S
Sketch
Other Steps to Reproduce
No response
What is your development environment
No response
I have checked existing issues, discussions and online documentation