Merge pull request #2410 from jepler/nrf-extended-samplerate

nrf: PWMAudioOut: 62500Hz limitation is not needed
This commit is contained in:
Scott Shawcroft 2019-12-20 09:31:02 -08:00 committed by GitHub
commit f08c7d470d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,10 +225,6 @@ void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t* self,
self->loop = loop; self->loop = loop;
uint32_t sample_rate = audiosample_sample_rate(sample); uint32_t sample_rate = audiosample_sample_rate(sample);
uint32_t max_sample_rate = 62500;
if (sample_rate > max_sample_rate) {
mp_raise_ValueError_varg(translate("Sample rate too high. It must be less than %d"), max_sample_rate);
}
self->bytes_per_sample = audiosample_bits_per_sample(sample) / 8; self->bytes_per_sample = audiosample_bits_per_sample(sample) / 8;
uint32_t max_buffer_length; uint32_t max_buffer_length;