circuitpython/shared-module
Ben Combee 98b0029a29 audiomp3: add decoded_samples property
In my testing, there is no way to accurately know how far into a MP3 file
you're currently playing. You can use monotonic time, but that can have
drift versus the audio playback system, which may not be running at exactly
the expected sample rate.

To allow syncing animation with timestamps in a MP3 file, this presents a
new property, decoded_samples, that records the number of audio samples
sent out of the decoder. While this may not be a completely accurate time,
due to mixer delays, it's much better position that the monotonic clock
difference.

Implementation is keeping track of this value in the mp3file structure and
adding to it whenever data is sent out of the decoder. The property
implementation was a copy/paste from current properties in the audiomp3
files.
2022-01-01 23:28:43 -06:00
..
_bleio Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
_eve Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
_stage Stage: add support for viewport scrolling 2021-10-09 00:05:49 +02:00
adafruit_bus_device Fix busdevice stub path 2021-12-28 19:31:40 +11:00
adafruit_pixelbuf Explicitly cast float to mp_int_t 2021-12-17 16:23:58 -05:00
aesio run code formatting script 2021-03-15 19:27:36 +05:30
atexit Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
audiocore Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
audioio bring MixerVoice back to building state; update documentation 2019-08-03 11:20:06 -05:00
audiomixer Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
audiomp3 audiomp3: add decoded_samples property 2022-01-01 23:28:43 -06:00
audiopwmio audiopwmio: Add the shared files for this new module 2019-07-26 07:52:37 -05:00
bitbangio Move OneWire to `onewireio` from `busio` 2021-08-12 10:47:14 -07:00
bitmaptools bitmaptools: dither: get rid of shifts 2021-11-24 09:51:24 -06:00
bitops Merge MicroPython 1.14 into CircuitPython 2021-05-11 15:07:40 -07:00
board Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
busio Move OneWire to `onewireio` from `busio` 2021-08-12 10:47:14 -07:00
canio Enable -Werror=missing-prototypes on espressif port 2021-11-10 11:07:45 -06:00
displayio tilegrid size properties 2021-12-13 09:44:08 -06:00
fontio Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
framebufferio Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
gamepadshift more missing-prototypes fixes 2021-11-10 21:00:17 -06:00
getpass Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
gifio use mp_get_stream_raise, it's more specific 2021-11-20 08:53:04 -05:00
imagecapture ParallelImageCapture: Add continuous capture on espressif 2021-11-03 11:02:46 -05:00
ipaddress run code formatting script 2021-03-15 19:27:36 +05:30
is31fl3741 Renaming files 2021-11-23 17:21:13 -06:00
keypad Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
memorymonitor run code formatting script 2021-03-15 19:27:36 +05:30
msgpack Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
multiterminal Merge tag 'v1.9.3' 2017-11-02 12:41:50 -07:00
onewireio Move OneWire to `onewireio` from `busio` 2021-08-12 10:47:14 -07:00
os run code formatting script 2021-03-15 19:27:36 +05:30
paralleldisplay Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
qrio Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
rainbowio rainbowio: optimize for code size 2021-11-12 17:31:22 -06:00
random Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
rgbmatrix remove commented-out code 2021-05-27 11:33:17 -05:00
rotaryio Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
sdcardio print addl debug message 2021-12-08 21:03:06 -06:00
sharpdisplay Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
storage go into safe mode if not CIRCUITPY available 2021-12-27 18:58:24 -05:00
struct Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
synthio RP2040 PWMAudioOut: Release DMA channels after play has finished. 2021-07-01 17:36:29 -04:00
terminalio Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
time Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
touchio run code formatting script 2021-03-15 19:27:36 +05:30
traceback Reduce code duplication in traceback module 2021-08-09 08:27:28 -05:00
uheap Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
usb_cdc Enable -Wmissing-prototypes for atmel-samd 2021-11-09 20:05:00 -06:00
usb_hid check that boot device is interface #0; remove instrumentation 2021-10-13 12:30:01 -04:00
usb_midi Enable -Wmissing-prototypes for atmel-samd 2021-11-09 20:05:00 -06:00
ustack run code formatting script 2021-03-15 19:27:36 +05:30
vectorio vectorio contains(x, y) 2021-12-27 12:01:19 -10:00