CircuitPython/audiobusio.py

Wed, 28 Aug 2019 19:53:19 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 28 Aug 2019 19:53:19 +0200
changeset 6
81a2208f13e4
child 7
e336d6afc5a6
permissions
-rw-r--r--

Started with the stubs for CircuitPython.

6
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3 # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de>
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module containing stubs for API generation of the 'audiobusio' module.
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 class I2SOut():
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 def __init__(self, bit_clock, word_select, data, *, left_justified):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 def deinit(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 def play(self, sample, *, loop=False):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 def stop(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 @property
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 def playing(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 def pause(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 def resume(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 @property
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 def paused(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 class PDMIn():
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 def __init__(self, clock_pin, data_pin, *, sample_rate=16000, bit_depth=8,
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 mono=True, oversample=64, startup_delay=0.11):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 def deinit(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 def record(self, destination, destination_length):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 @property
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 def sample_rate(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 pass

eric ide

mercurial