CircuitPython/audiocore.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 'audiocore' 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 Mixer():
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 def __init__(self, channel_count=2, buffer_size=1024):
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, *, voice=0, 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_voice(self, voice=0):
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 @property
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 def sample_rate(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 class RawSample():
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 def __init__(self, buffer, *, channel_count=1, sample_rate=8000):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 def deinit(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 @property
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 def sample_rate(self):
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 class WaveFile():
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 def __init__(self, file, buffer=None):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 def deinit(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 @property
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 def sample_rate(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 @property
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 def bits_per_sample(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 pass
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 @property
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 def channel_count(self):
81a2208f13e4 Started with the stubs for CircuitPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 pass

eric ide

mercurial