mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-09-26 11:31:03 -04:00
Const/pass-by-reference a bunch more baseband stuff.
This commit is contained in:
parent
3ed77af0c1
commit
ef315f0d92
22 changed files with 28 additions and 28 deletions
|
@ -32,7 +32,7 @@
|
|||
class AudioStatsCollector {
|
||||
public:
|
||||
template<typename Callback>
|
||||
void feed(buffer_s16_t src, Callback callback) {
|
||||
void feed(const buffer_s16_t& src, Callback callback) {
|
||||
consume_audio_buffer(src);
|
||||
|
||||
if( update_stats(src.count, src.sampling_rate) ) {
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
|
||||
AudioStatistics statistics;
|
||||
|
||||
void consume_audio_buffer(buffer_s16_t src) {
|
||||
void consume_audio_buffer(const buffer_s16_t& src) {
|
||||
auto src_p = src.p;
|
||||
const auto src_end = &src.p[src.count];
|
||||
while(src_p < src_end) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue