8000 Merge remote-tracking branch 'origin/main' · unwiredben/circuitpython@5d58e0e · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d58e0e

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents c0a52e5 + b2c338b commit 5d58e0e

File tree

19 files changed

+798
-0
lines changed

19 files changed

+798
-0
lines changed

locale/circuitpython.pot

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2595,6 +2595,11 @@ msgstr ""
25952595
#: shared-bindings/audiodelays/MultiTapDelay.c
25962596
#: shared-bindings/audiodelays/PitchShift.c
25972597
#: shared-bindings/audiofilters/Distortion.c
2598+
#: shared-bindings/audiodelays/Reverb.c
2599+
msgid "bits_per_sample must be 16"
2600+
msgstr ""
2601+
2602+
#: shared-bindings/audiodelays/Echo.c shared-bindings/audiofilters/Distortion.c
25982603
#: shared-bindings/audiofilters/Filter.c shared-bindings/audiomixer/Mixer.c
25992604
msgid "bits_per_sample must be 8 or 16"
26002605
msgstr ""
@@ -4012,6 +4017,10 @@ msgstr ""
40124017
msgid "rsplit(None,n)"
40134018
msgstr ""
40144019

4020+
#: shared-bindings/audiodelays/Reverb.c
4021+
msgid "samples_signed must be true"
4022+
msgstr ""
4023+
40154024
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
40164025
#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c
40174026
msgid "sampling rate out of range"

ports/unix/variants/coverage/mpconfigvariant.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ SRC_BITMAP := \
4141
shared-bindings/audiofilters/Distortion.c \
4242
shared-bindings/audiofilters/Filter.c \
4343
shared-bindings/audiofilters/__init__.c \
44+
shared-bindings/audiofreeverb/Freeverb.c \
45+
shared-bindings/audiofreeverb/__init__.c \
4446
shared-bindings/audiomixer/__init__.c \
4547
shared-bindings/audiomixer/Mixer.c \
4648
shared-bindings/audiomixer/MixerVoice.c \
@@ -86,6 +88,8 @@ SRC_BITMAP := \
8688
shared-module/audiofilters/Distortion.c \
8789
shared-module/audiofilters/Filter.c \
8890
shared-module/audiofilters/__init__.c \
91+
shared-module/audiofreeverb/Freeverb.c \
92+
shared-module/audiofreeverb/__init__.c \
8993
shared-module/audiomixer/__init__.c \
9094
shared-module/audiomp3/MP3Decoder.c \
9195
shared-module/audiomixer/Mixer.c \

ports/zephyr-cp/boards/nordic/nrf5340dk/autogen_board_info.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ audiobusio = false
1919
audiocore = false
2020
audiodelays = false
2121
audiofilters = false
22+
audiofreeverb = false
2223
audioio = false
2324
audiomixer = false
2425
audiomp3 = false

ports/zephyr-cp/boards/nordic/nrf54l15dk/autogen_board_info.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ audiobusio = false
1919
audiocore = false
2020
audiodelays = false
2121
audiofilters = false
22+
audiofreeverb = false
2223
audioio = false
2324
audiomixer = false
2425
audiomp3 = false

ports/zephyr-cp/boards/nordic/nrf7002dk/autogen_board_info.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ audiobusio = false
1919
audiocore = false
2020
audiodelays = false
2121
audiofilters = false
22+
audiofreeverb = false
2223
audioio = false
2324
audiomixer = false
2425
audiomp3 = false

ports/zephyr-cp/boards/renesas/ek_ra6m5/autogen_board_info.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ audiobusio = false
1919
audiocore = false
2020
audiodelays = false
2121
audiofilters = false
22+
audiofreeverb = false
2223
audioio = false
2324
audiomixer = false
2425
audiomp3 = false

ports/zephyr-cp/boards/renesas/ek_ra8d1/autogen_board_info.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ audiobusio = false
1919
audiocore = false
2020
audiodelays = false
2121
audiofilters = false
22+
audiofreeverb = false
2223
audioio = false
2324
audiomixer = false
2425
audiomp3 = false

ports/zephyr-cp/boards/st/nucleo_u575zi_q/autogen_board_info.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ audiobusio = false
1919
audiocore = false
2020
audiodelays = false
2121
audiofilters = false
22+
audiofreeverb = false
2223
audioio = false
2324
audiomixer = false
2425
audiomp3 = false

ports/zephyr-cp/boards/st/stm32h7b3i_dk/autogen_board_info.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ audiobusio = false
1919
audiocore = false
2020
audiodelays = false
2121
audiofilters = false
22+
audiofreeverb = false
2223
audioio = false
2324
audiomixer = false
2425
audiomp3 = false

py/circuitpy_defns.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ endif
137137
ifeq ($(CIRCUITPY_AUDIOFILTERS),1)
138138
SRC_PATTERNS += audiofilters/%
139139
endif
140+
ifeq ($(CIRCUITPY_AUDIOFREEVERB),1)
141+
SRC_PATTERNS += audiofreeverb/%
142+
endif
140143
ifeq ($(CIRCUITPY_AUDIOMIXER),1)
141144
SRC_PATTERNS += audiomixer/%
142145
endif
@@ -671,6 +674,8 @@ SRC_SHARED_MODULE_ALL = \
671674
audiofilters/Distortion.c \
672675
audiofilters/Filter.c \
673676
audiofilters/__init__.c \
677+
audiofreeverb/__init__.c \
678+
audiofreeverb/Freeverb.c \
674679
audioio/__init__.c \
675680
audiomixer/Mixer.c \
676681
audiomixer/MixerVoice.c \

py/circuitpy_mpconfig.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ CIRCUITPY_AUDIODELAYS ?= $(CIRCUITPY_AUDIOEFFECTS)
146146
CFLAGS += -DCIRCUITPY_AUDIODELAYS=$(CIRCUITPY_AUDIODELAYS)
147147
CIRCUITPY_AUDIOFILTERS ?= $(CIRCUITPY_AUDIOEFFECTS)
148148
CFLAGS += -DCIRCUITPY_AUDIOFILTERS=$(CIRCUITPY_AUDIOFILTERS)
149+
CIRCUITPY_AUDIOFREEVERB ?= $(CIRCUITPY_AUDIOEFFECTS)
150+
CFLAGS += -DCIRCUITPY_AUDIOFREEVERB=$(CIRCUITPY_AUDIOFREEVERB)
149151

150152
CIRCUITPY_AURORA_EPAPER ?= 0
151153
CFLAGS += -DCIRCUITPY_AURORA_EPAPER=$(CIRCUITPY_AURORA_EPAPER)
Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
// This file is part of the CircuitPython project: https://circuitpython.org
2+
//
3+
// SPDX-FileCopyrightText: Copyright (c) 2025 Mark Komus
4+
//
5+
// SPDX-License-Identifier: MIT
6+
7+
#include <stdint.h>
8+
9+
#include "shared-bindings/audiofreeverb/Freeverb.h"
10+
#include "shared-bindings/audiocore/__init__.h"
11+
#include "shared-module/audiofreeverb/Freeverb.h"
12+
13+
#include "shared/runtime/context_manager_helpers.h"
14+
#include "py/binary.h"
15+
#include "py/objproperty.h"
16+
#include "py/runtime.h"
17+
#include "shared-bindings/util.h"
18+
#include "shared-module/synthio/block.h"
19+
20+
//| class Freeverb:
21+
//| """An Freeverb effect"""
22+
//|
23+
//| def __init__(
24+
//| self,
25+
//| roomsize: synthio.BlockInput = 0.5,
26+
//| damp: synthio.BlockInput = 0.5,
27+
//| mix: synthio.BlockInput = 0.5,
28+
//| buffer_size: int = 512,
29+
//| sample_rate: int = 8000,
30+
//| bits_per_sample: int = 16,
31+
//| samples_signed: bool = True,
32+
//| channel_count: int = 1,
33+
//| ) -> None:
34+
//| """Create a Reverb effect simulating the audio taking place in a large room where you get echos
35+
//| off of various surfaces at various times. The size of the room can be adjusted as well as how
36+
//| much the higher frequencies get absorbed by the walls.
37+
//|
38+
//| The mix parameter allows you to change how much of the unchanged sample passes through to
39+
//| the output to how much of the effect audio you hear as the output.
40+
//|
41+
//| :param synthio.BlockInput roomsize: The size of the room. 0.0 = smallest; 1.0 = largest.
42+
//| :param synthio.BlockInput damp: How much the walls absorb. 0.0 = least; 1.0 = most.
43+
//| :param synthio.BlockInput mix: The mix as a ratio of the sample (0.0) to the effect (1.0).
44+
//| :param int buffer_size: The total size in bytes of each of the two playback buffers to use
45+
//| :param int sample_rate: The sample rate to be used
46+
//| :param int channel_count: The number of channels the source samples contain. 1 = mono; 2 = stereo.
47+
//| :param int bits_per_sample: The bits per sample of the effect. Freeverb requires 16 bits.
48+
//| :param bool samples_signed: Effect is signed (True) or unsigned (False). Freeverb requires signed (True).
49+
//|
50+
//| Playing adding reverb to a synth::
51+
//|
52+
//| import time
53+
//| import board
54+
//| import audiobusio
55+
//| import synthio
56+
//| import audiofreeverb
57+
//|
58+
//| audio = audiobusio.I2SOut(bit_clock=board.GP20, word_select=board.GP21, data=board.GP22)
59+
//| synth = synthio.Synthesizer(channel_count=1, sample_rate=44100)
60+
//| reverb = audiofreeverb.Freeverb(roomsize=0.7, damp=0.3, buffer_size=1024, channel_count=1, sample_rate=44100, mix=0.7)
61+
//| reverb.play(synth)
62+
//| audio.play(reverb)
63+
//|
64+
//| note = synthio.Note(261)
65+
//| while True:
66+
//| synth.press(note)
67< F438 span class="diff-text-marker">+
//| time.sleep(0.55)
68+
//| synth.release(note)
69+
//| time.sleep(5)"""
70+
//| ...
71+
//|
72+
static mp_obj_t audiofreeverb_freeverb_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
73+
enum { ARG_roomsize, ARG_damp, ARG_mix, ARG_buffer_size, ARG_sample_rate, ARG_bits_per_sample, ARG_samples_signed, ARG_channel_count, };
74+
static const mp_arg_t allowed_args[] = {
75+
{ MP_QSTR_roomsize, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_OBJ_NULL} },
76+
{ MP_QSTR_damp, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_OBJ_NULL} },
77+
{ MP_QSTR_mix, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_OBJ_NULL} },
78+
{ MP_QSTR_buffer_size, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 512} },
79+
{ MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 8000} },
80+
{ MP_QSTR_bits_per_sample, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 16} },
81+
{ MP_QSTR_samples_signed, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} },
82+
{ MP_QSTR_channel_count, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1 } },
83+
};
84+
85+
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
86+
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
87+
88+
mp_int_t channel_count = mp_arg_validate_int_range(args[ARG_channel_count].u_int, 1, 2, MP_QSTR_channel_count);
89+
mp_int_t sample_rate = mp_arg_validate_int_min(args[ARG_sample_rate].u_int, 1, MP_QSTR_sample_rate);
90+
if (args[ARG_samples_signed].u_bool != true) {
91+
mp_raise_ValueError(MP_ERROR_TEXT("samples_signed must be true"));
92+
}
93+
mp_int_t bits_per_sample = args[ARG_bits_per_sample].u_int;
94+
if (bits_per_sample != 16) {
95+
mp_raise_ValueError(MP_ERROR_TEXT("bits_per_sample must be 16"));
96+
}
97+
98+
audiofreeverb_freeverb_obj_t *self = mp_obj_malloc(audiofreeverb_freeverb_obj_t, &audiofreeverb_freeverb_type);
99+
common_hal_audiofreeverb_freeverb_construct(self, args[ARG_roomsize].u_obj, args[ARG_damp].u_obj, args[ARG_mix].u_obj, args[ARG_buffer_size].u_int, bits_per_sample, args[ARG_samples_signed].u_bool, channel_count, sample_rate);
100+
101+
return MP_OBJ_FROM_PTR(self);
102+
}
103+
104+
//| def deinit(self) -> None:
105+
//| """Deinitialises the Freeverb."""
106+
//| ...
107+
//|
108+
static mp_obj_t audiofreeverb_freeverb_deinit(mp_obj_t self_in) {
109+
audiofreeverb_freeverb_obj_t *self = MP_OBJ_TO_PTR(self_in);
110+
common_hal_audiofreeverb_freeverb_deinit(self);
111+
return mp_const_none;
112+
}
113+
static MP_DEFINE_CONST_FUN_OBJ_1(audiofreeverb_freeverb_deinit_obj, audiofreeverb_freeverb_deinit);
114+
115+
static void check_for_deinit(audiofreeverb_freeverb_obj_t *self) {
116+
audiosample_check_for_deinit(&self->base);
117+
}
118+
119+
//| def __enter__(self) -> Freeverb:
120+
//| """No-op used by Context Managers."""
121+
//| ...
122+
//|
123+
// Provided by context manager helper.
124+
125+
//| def __exit__(self) -> None:
126+
//| """Automatically deinitializes when exiting a context. See
127+
//| :ref:`lifetime-and-contextmanagers` for more info."""
128+
//| ...
129+
//|
130+
// Provided by context manager helper.
131+
132+
//| roomsize: synthio.BlockInput
133+
//| """Apparent size of the room 0.0-1.0"""
134+
static mp_obj_t audiofreeverb_freeverb_obj_get_roomsize(mp_obj_t self_in) {
135+
return common_hal_audiofreeverb_freeverb_get_roomsize(self_in);
136+
}
137+
MP_DEFINE_CONST_FUN_OBJ_1(audiofreeverb_freeverb_get_roomsize_obj, audiofreeverb_freeverb_obj_get_roomsize);
138+
139+
static mp_obj_t audiofreeverb_freeverb_obj_set_roomsize(mp_obj_t self_in, mp_obj_t roomsize) {
140+
audiofreeverb_freeverb_obj_t *self = MP_OBJ_TO_PTR(self_in);
141+
common_hal_audiofreeverb_freeverb_set_roomsize(self, roomsize);
142+
return mp_const_none;
143+
}
144+
MP_DEFINE_CONST_FUN_OBJ_2(audiofreeverb_freeverb_set_roomsize_obj, audiofreeverb_freeverb_obj_set_roomsize);
145+
146+
MP_PROPERTY_GETSET(audiofreeverb_freeverb_roomsize_obj,
147+
(mp_obj_t)&audiofreeverb_freeverb_get_roomsize_obj,
148+
(mp_obj_t)&audiofreeverb_freeverb_set_roomsize_obj);
149+
150+
//| damp: synthio.BlockInput
151+
//| """How much the high frequencies are dampened in the area. 0.0-1.0"""
152+
static mp_obj_t audiofreeverb_freeverb_obj_get_damp(mp_obj_t self_in) {
153+
return common_hal_audiofreeverb_freeverb_get_damp(self_in);
154+
}
155+
MP_DEFINE_CONST_FUN_OBJ_1(audiofreeverb_freeverb_get_damp_obj, audiofreeverb_freeverb_obj_get_damp);
156+
157+
static mp_obj_t audiofreeverb_freeverb_obj_set_damp(mp_obj_t self_in, mp_obj_t damp) {
158+
audiofreeverb_freeverb_obj_t *self = MP_OBJ_TO_PTR(self_in);
159+
common_hal_audiofreeverb_freeverb_set_damp(self, damp);
160+
return mp_const_none;
161+
}
162+
MP_DEFINE_CONST_FUN_OBJ_2(audiofreeverb_freeverb_set_damp_obj, audiofreeverb_freeverb_obj_set_damp);
163+
164+
MP_PROPERTY_GETSET(audiofreeverb_freeverb_damp_obj,
165+
(mp_obj_t)&audiofreeverb_freeverb_get_damp_obj,
166+
(mp_obj_t)&audiofreeverb_freeverb_set_damp_obj);
167+
168+
//| mix: synthio.BlockInput
169+
//| """The rate the reverb mix between 0 and 1 where 0 is only sample and 1 is all effect."""
170+
static mp_obj_t audiofreeverb_freeverb_obj_get_mix(mp_obj_t self_in) {
171+
return common_hal_audiofreeverb_freeverb_get_mix(self_in);
172+
}
173+
MP_DEFINE_CONST_FUN_OBJ_1(audiofreeverb_freeverb_get_mix_obj, audiofreeverb_freeverb_obj_get_mix);
174+
175+
static mp_obj_t audiofreeverb_freeverb_obj_set_mix(mp_obj_t self_in, mp_obj_t mix_in) {
176+
audiofreeverb_freeverb_obj_t *self = MP_OBJ_TO_PTR(self_in);
177+
common_hal_audiofreeverb_freeverb_set_mix(self, mix_in);
178+
return mp_const_none;
179+
}
180+
MP_DEFINE_CONST_FUN_OBJ_2(audiofreeverb_freeverb_set_mix_obj, audiofreeverb_freeverb_obj_set_mix);
181+
182+
MP_PROPERTY_GETSET(audiofreeverb_freeverb_mix_obj,
183+
(mp_obj_t)&audiofreeverb_freeverb_get_mix_obj,
184+
(mp_obj_t)&audiofreeverb_freeverb_set_mix_obj);
185+
186+
//| playing: bool
187+
//| """True when the effect is playing a sample. (read-only)"""
188+
//|
189+
static mp_obj_t audiofreeverb_freeverb_obj_get_playing(mp_obj_t self_in) {
190+
audiofreeverb_freeverb_obj_t *self = MP_OBJ_TO_PTR(self_in);
191+
check_for_deinit(self);
192+
return mp_obj_new_bool(common_hal_audiofreeverb_freeverb_get_playing(self));
193+
}
194+
MP_DEFINE_CONST_FUN_OBJ_1(audiofreeverb_freeverb_get_playing_obj, audiofreeverb_freeverb_obj_get_playing);
195< 10000 span class="diff-text-marker">+
196+
MP_PROPERTY_GETTER(audiofreeverb_freeverb_playing_obj,
197+
(mp_obj_t)&audiofreeverb_freeverb_get_playing_obj);
198+
199+
//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None:
200+
//| """Plays the sample once when loop=False and continuously when loop=True.
201+
//| Does not block. Use `playing` to block.
202+
//|
203+
//| The sample must match the encoding settings given in the constructor."""
204+
//| ...
205+
//|
206+
static mp_obj_t audiofreeverb_freeverb_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
207+
enum { ARG_sample, ARG_loop };
208+
static const mp_arg_t allowed_args[] = {
209+
{ MP_QSTR_sample, MP_ARG_OBJ | MP_ARG_REQUIRED, {} },
210+
{ MP_QSTR_loop, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
211+
};
212+
audiofreeverb_freeverb_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
213+
check_for_deinit(self);
214+
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
215+
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
216+
217+
218+
mp_obj_t sample = args[ARG_sample].u_obj;
219+
common_hal_audiofreeverb_freeverb_play(self, sample, args[ARG_loop].u_bool);
220+
221+
return mp_const_none;
222+
}
223+
MP_DEFINE_CONST_FUN_OBJ_KW(audiofreeverb_freeverb_play_obj, 1, audiofreeverb_freeverb_obj_play);
224+
225+
//| def stop(self) -> None:
226+
//| """Stops playback of the sample. The reverb continues playing."""
227+
//| ...
228+
//|
229+
//|
230+
static mp_obj_t audiofreeverb_freeverb_obj_stop(mp_obj_t self_in) {
231+
audiofreeverb_freeverb_obj_t *self = MP_OBJ_TO_PTR(self_in);
232+
233+
common_hal_audiofreeverb_freeverb_stop(self);
234+
return mp_const_none;
235+
}
236+
MP_DEFINE_CONST_FUN_OBJ_1(audiofreeverb_freeverb_stop_obj, audiofreeverb_freeverb_obj_stop);
237+
238+
static const mp_rom_map_elem_t audiofreeverb_freeverb_locals_dict_table[] = {
239+
// Methods
240+
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&audiofreeverb_freeverb_deinit_obj) },
241+
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
242+
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&default___exit___obj) },
243+
{ MP_ROM_QSTR(MP_QSTR_play), MP_ROM_PTR(&audiofreeverb_freeverb_play_obj) },
244+
{ MP_ROM_QSTR(MP_QSTR_stop), MP_ROM_PTR(&audiofreeverb_freeverb_stop_obj) },
245+
246+
// Properties
247+
{ MP_ROM_QSTR(MP_QSTR_playing), MP_ROM_PTR(&audiofreeverb_freeverb_playing_obj) },
248+
{ MP_ROM_QSTR(MP_QSTR_roomsize), MP_ROM_PTR(&audiofreeverb_freeverb_roomsize_obj) },
249+
{ MP_ROM_QSTR(MP_QSTR_damp), MP_ROM_PTR(&audiofreeverb_freeverb_damp_obj) },
250+
{ MP_ROM_QSTR(MP_QSTR_mix), MP_ROM_PTR(&audiofreeverb_freeverb_mix_obj) },
251+
AUDIOSAMPLE_FIELDS,
252+
};
253+
static MP_DEFINE_CONST_DICT(audiofreeverb_freeverb_locals_dict, audiofreeverb_freeverb_locals_dict_table);
254+
255+
static const audiosample_p_t audiofreeverb_freeverb_proto = {
256+
MP_PROTO_IMPLEMENT(MP_QSTR_protocol_audiosample)
257+
.reset_buffer = (audiosample_reset_buffer_fun)audiofreeverb_freeverb_reset_buffer,
258+
.get_buffer = (audiosample_get_buffer_fun)audiofreeverb_freeverb_get_buffer,
259+
};
260+
261+
MP_DEFINE_CONST_OBJ_TYPE(
262+
audiofreeverb_freeverb_type,
263+
MP_QSTR_freeverb,
264+
MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS,
265+
make_new, audiofreeverb_freeverb_make_new,
266+
locals_dict, &audiofreeverb_freeverb_locals_dict,
267+
protocol, &audiofreeverb_freeverb_proto
268+
);

0 commit comments

Comments
 (0)
0