diff options
| author | sommersoft <sommersoft@gmail.com> | 2019-08-03 11:20:06 -0500 |
|---|---|---|
| committer | sommersoft <sommersoft@gmail.com> | 2019-08-03 11:20:06 -0500 |
| commit | 065efb05b75e35f7e161b6828742b01d26ce5379 (patch) | |
| tree | d08dfbb71bd5375db4f964604c6d5a887ca4dd7d /shared-module | |
| parent | 9939d0c4f49db084f52a12b6ea5f6ce97b614146 (diff) | |
bring MixerVoice back to building state; update documentation
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/audiocore/Mixer.c | 1 | ||||
| -rw-r--r-- | shared-module/audiocore/MixerVoice.c (renamed from shared-module/audioio/MixerVoice.c) | 32 | ||||
| -rw-r--r-- | shared-module/audiocore/MixerVoice.h | 46 | ||||
| -rw-r--r-- | shared-module/audioio/MixerVoice.h | 28 |
4 files changed, 72 insertions, 35 deletions
diff --git a/shared-module/audiocore/Mixer.c b/shared-module/audiocore/Mixer.c index 8c083f419..40ed63dc4 100644 --- a/shared-module/audiocore/Mixer.c +++ b/shared-module/audiocore/Mixer.c @@ -25,6 +25,7 @@ */ #include "shared-bindings/audiocore/Mixer.h" +#include "shared-bindings/audiocore/MixerVoice.h" #include <stdint.h> diff --git a/shared-module/audioio/MixerVoice.c b/shared-module/audiocore/MixerVoice.c index 3e8aaff89..c16dfccb0 100644 --- a/shared-module/audioio/MixerVoice.c +++ b/shared-module/audiocore/MixerVoice.c @@ -1,18 +1,36 @@ /* - * MixerVoice.c + * This file is part of the Micro Python project, http://micropython.org/ * - * Created on: Nov 15, 2018 - * Author: dean + * The MIT License (MIT) + * + * Copyright (c) 2018 DeanM for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. */ - -#include "shared-bindings/audioio/Mixer.h" +#include "shared-bindings/audiocore/Mixer.h" #include <stdint.h> #include "py/runtime.h" #include "shared-module/audioio/__init__.h" -#include "shared-module/audioio/RawSample.h" -#include "shared-module/audioio/MixerVoice.h" +#include "shared-module/audiocore/RawSample.h" +#include "shared-module/audiocore/MixerVoice.h" void common_hal_audioio_mixervoice_set_parent(audioio_mixervoice_obj_t* self, audioio_mixer_obj_t *parent) { self->parent = parent; diff --git a/shared-module/audiocore/MixerVoice.h b/shared-module/audiocore/MixerVoice.h new file mode 100644 index 000000000..6010313bf --- /dev/null +++ b/shared-module/audiocore/MixerVoice.h @@ -0,0 +1,46 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 DeanM for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#ifndef SHARED_MODULE_AUDIOIO_MIXERVOICE_H_ +#define SHARED_MODULE_AUDIOIO_MIXERVOICE_H_ + +#include "py/obj.h" + +#include "shared-module/audiocore/__init__.h" +#include "shared-module/audiocore/Mixer.h" + +typedef struct { + mp_obj_base_t base; + audioio_mixer_obj_t *parent; + mp_obj_t sample; + bool loop; + bool more_data; + uint32_t* remaining_buffer; + uint32_t buffer_length; + int16_t level; +} audioio_mixervoice_obj_t; + + +#endif /* SHARED_MODULE_AUDIOIO_MIXERVOICE_H_ */ diff --git a/shared-module/audioio/MixerVoice.h b/shared-module/audioio/MixerVoice.h deleted file mode 100644 index 2811a741a..000000000 --- a/shared-module/audioio/MixerVoice.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * MixerVoice.h - * - * Created on: Nov 15, 2018 - * Author: dean - */ - -#ifndef SHARED_MODULE_AUDIOIO_MIXERVOICE_H_ -#define SHARED_MODULE_AUDIOIO_MIXERVOICE_H_ - -#include "py/obj.h" - -#include "shared-module/audioio/__init__.h" -#include "shared-module/audioio/Mixer.h" - -typedef struct { - mp_obj_base_t base; - audioio_mixer_obj_t *parent; - mp_obj_t sample; - bool loop; - bool more_data; - uint32_t* remaining_buffer; - uint32_t buffer_length; - int16_t level; -} audioio_mixervoice_obj_t; - - -#endif /* SHARED_MODULE_AUDIOIO_MIXERVOICE_H_ */ |
