Conversation
|
Updated to M5Unified-compatible audio and talk samples. |
yoshipon
left a comment
There was a problem hiding this comment.
Thank you for the library migration!!!
I think simplicity is important for beginners.
So, if we don't need the custom configuration for Speaker, I think it is better to leave the default configuration.
What do you think?
Thank you in advance!
| auto cfg = M5.config(); | ||
| M5.begin(cfg); |
There was a problem hiding this comment.
| auto cfg = M5.config(); | |
| M5.begin(cfg); | |
| M5.begin(); |
There was a problem hiding this comment.
I think this one should remain.
There was a problem hiding this comment.
Until the M5Unified's documentation is more solid, I'll try to supplement it with a few comments.
Like this? (this is just a suggestion based on your kind information on twitter👍)
| auto cfg = M5.config(); | |
| M5.begin(cfg); | |
| auto cfg = M5.config(); // modify cfg for configurating M5 (details: https://github.com/m5stack/M5Unified/blob/master/examples/Basic/HowToUse/HowToUse.ino#L47-L60) | |
| M5.begin(cfg); |
# すみません,お仕事増やしてしまい恐縮なので,適当にコメント考えてみました! ご参考まで
| { /// custom setting | ||
| auto spk_cfg = M5.Speaker.config(); | ||
| /// Increasing the sample_rate will improve the sound quality instead of increasing the CPU load. | ||
| spk_cfg.sample_rate = 96000; // default:64000 (64kHz) e.g. 48000 , 50000 , 80000 , 96000 , 100000 , 128000 , 144000 , 192000 , 200000 | ||
| M5.Speaker.config(spk_cfg); | ||
| } |
There was a problem hiding this comment.
| { /// custom setting | |
| auto spk_cfg = M5.Speaker.config(); | |
| /// Increasing the sample_rate will improve the sound quality instead of increasing the CPU load. | |
| spk_cfg.sample_rate = 96000; // default:64000 (64kHz) e.g. 48000 , 50000 , 80000 , 96000 , 100000 , 128000 , 144000 , 192000 , 200000 | |
| M5.Speaker.config(spk_cfg); | |
| } |
|
Speaker(spk_cfg) may not need it, but as for M5.begin(), beginners are not familiar with M5Unified's Config method, so it is better to write it. |
|
Thanks for your rapid reply! I see!!! |
|
Yes, it is. It is indeed hard to understand. Until the M5Unified's documentation is more solid, I'll try to supplement it with a few comments. |
This is an omission that was corrected when the library was changed to M5Unified.
#76