Skip to content

Commit 94a234f

Browse files
committed
Remove unnecessary deinited functions for audiosample objects.
1 parent 9dfa9cf commit 94a234f

File tree

12 files changed

+0
-48
lines changed

12 files changed

+0
-48
lines changed

shared-bindings/audiocore/RawSample.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ void common_hal_audioio_rawsample_construct(audioio_rawsample_obj_t *self,
1515
uint8_t channel_count, uint32_t sample_rate, bool single_buffer);
1616

1717
void common_hal_audioio_rawsample_deinit(audioio_rawsample_obj_t *self);
18-
bool common_hal_audioio_rawsample_deinited(audioio_rawsample_obj_t *self);

shared-bindings/audiocore/WaveFile.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ void common_hal_audioio_wavefile_construct(audioio_wavefile_obj_t *self,
1717
pyb_file_obj_t *file, uint8_t *buffer, size_t buffer_size);
1818

1919
void common_hal_audioio_wavefile_deinit(audioio_wavefile_obj_t *self);
20-
bool common_hal_audioio_wavefile_deinited(audioio_wavefile_obj_t *self);

shared-bindings/audiodelays/Echo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ void common_hal_audiodelays_echo_construct(audiodelays_echo_obj_t *self, uint32_
1616
uint8_t channel_count, uint32_t sample_rate, bool freq_shift);
1717

1818
void common_hal_audiodelays_echo_deinit(audiodelays_echo_obj_t *self);
19-
bool common_hal_audiodelays_echo_deinited(audiodelays_echo_obj_t *self);
2019

2120
mp_obj_t common_hal_audiodelays_echo_get_delay_ms(audiodelays_echo_obj_t *self);
2221
void common_hal_audiodelays_echo_set_delay_ms(audiodelays_echo_obj_t *self, mp_obj_t delay_ms);

shared-bindings/audiodelays/PitchShift.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ void common_hal_audiodelays_pitch_shift_construct(audiodelays_pitch_shift_obj_t
1616
uint8_t channel_count, uint32_t sample_rate);
1717

1818
void common_hal_audiodelays_pitch_shift_deinit(audiodelays_pitch_shift_obj_t *self);
19-
bool common_hal_audiodelays_pitch_shift_deinited(audiodelays_pitch_shift_obj_t *self);
2019

2120
mp_obj_t common_hal_audiodelays_pitch_shift_get_semitones(audiodelays_pitch_shift_obj_t *self);
2221
void common_hal_audiodelays_pitch_shift_set_semitones(audiodelays_pitch_shift_obj_t *self, mp_obj_t semitones);

shared-bindings/audiofilters/Distortion.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ void common_hal_audiofilters_distortion_construct(audiofilters_distortion_obj_t
1818
uint8_t channel_count, uint32_t sample_rate);
1919

2020
void common_hal_audiofilters_distortion_deinit(audiofilters_distortion_obj_t *self);
21-
bool common_hal_audiofilters_distortion_deinited(audiofilters_distortion_obj_t *self);
2221

2322
mp_obj_t common_hal_audiofilters_distortion_get_drive(audiofilters_distortion_obj_t *self);
2423
void common_hal_audiofilters_distortion_set_drive(audiofilters_distortion_obj_t *self, mp_obj_t arg);

shared-bindings/audiofilters/Filter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ void common_hal_audiofilters_filter_construct(audiofilters_filter_obj_t *self,
1616
uint8_t channel_count, uint32_t sample_rate);
1717

1818
void common_hal_audiofilters_filter_deinit(audiofilters_filter_obj_t *self);
19-
bool common_hal_audiofilters_filter_deinited(audiofilters_filter_obj_t *self);
2019

2120
mp_obj_t common_hal_audiofilters_filter_get_filter(audiofilters_filter_obj_t *self);
2221
void common_hal_audiofilters_filter_set_filter(audiofilters_filter_obj_t *self, mp_obj_t arg);

shared-bindings/audiomixer/Mixer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ void common_hal_audiomixer_mixer_construct(audiomixer_mixer_obj_t *self,
2020
uint32_t sample_rate);
2121

2222
void common_hal_audiomixer_mixer_deinit(audiomixer_mixer_obj_t *self);
23-
bool common_hal_audiomixer_mixer_deinited(audiomixer_mixer_obj_t *self);
2423

2524
bool common_hal_audiomixer_mixer_get_playing(audiomixer_mixer_obj_t *self);

shared-module/audiodelays/Echo.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,7 @@ void common_hal_audiodelays_echo_construct(audiodelays_echo_obj_t *self, uint32_
105105
self->echo_buffer_left_pos = self->echo_buffer_right_pos = 0;
106106
}
107107

108-
bool common_hal_audiodelays_echo_deinited(audiodelays_echo_obj_t *self) {
109-
if (self->echo_buffer == NULL) {
110-
return true;
111-
}
112-
return false;
113-
}
114-
115108
void common_hal_audiodelays_echo_deinit(audiodelays_echo_obj_t *self) {
116-
if (common_hal_audiodelays_echo_deinited(self)) {
117-
return;
118-
}
119109
audiosample_mark_deinit(&self->base);
120110
self->echo_buffer = NULL;
121111
self->buffer[0] = NULL;

shared-module/audiodelays/PitchShift.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,7 @@ void common_hal_audiodelays_pitch_shift_construct(audiodelays_pitch_shift_obj_t
9595
recalculate_rate(self, f_semitones);
9696
}
9797

98-
bool common_hal_audiodelays_pitch_shift_deinited(audiodelays_pitch_shift_obj_t *self) {
99-
if (self->window_buffer == NULL) {
100-
return true;
101-
}
102-
return false;
103-
}
104-
10598
void common_hal_audiodelays_pitch_shift_deinit(audiodelays_pitch_shift_obj_t *self) {
106-
if (common_hal_audiodelays_pitch_shift_deinited(self)) {
107-
return;
108-
}
10999
audiosample_mark_deinit(&self->base);
110100
self->window_buffer = NULL;
111101
self->overlap_buffer = NULL;

shared-module/audiofilters/Distortion.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,6 @@ void common_hal_audiofilters_distortion_construct(audiofilters_distortion_obj_t
7474
self->soft_clip = soft_clip;
7575
}
7676

77-
bool common_hal_audiofilters_distortion_deinited(audiofilters_distortion_obj_t *self) {
78-
if (self->buffer[0] == NULL) {
79-
return true;
80-
}
81-
return false;
82-
}
83-
8477
void common_hal_audiofilters_distortion_deinit(audiofilters_distortion_obj_t *self) {
8578
audiosample_mark_deinit(&self->base);
8679
self->buffer[0] = NULL;

0 commit comments

Comments
 (0)