Skip to content

Commit 2debeca

Browse files
Comments
1 parent 22f1202 commit 2debeca

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

internal_filesystem/lib/mpos/audio/audioflinger.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,17 @@ def is_recording(self):
375375

376376
# ============================================================================
377377
# Class method forwarding to singleton instance
378+
#
379+
# Instead of writing each function like this:
380+
# @classmethod
381+
# def has_microphone(cls):
382+
# instance = cls.get()
383+
# return instance._i2s_pins is not None and 'sd_in' in instance._i2s_pins
384+
#
385+
# They can be written like this:
386+
# def has_microphone(self):
387+
# return self._i2s_pins is not None and 'sd_in' in self._i2s_pins
388+
#
378389
# ============================================================================
379390
# Store original instance methods before replacing them
380391
_original_methods = {}

0 commit comments

Comments
 (0)