summaryrefslogtreecommitdiff
path: root/shared-module
AgeCommit message (Collapse)Author
2020-01-08Merge pull request #2445 from jepler/mp3-jeplayer-fixes5.0.0-beta.3Scott Shawcroft
Fixes for JEplayer
2020-01-06Fix more build problemsJeff Epler
2020-01-06audiomp3: rename to MP3DecoderJeff Epler
2020-01-02MP3File: Add rms_level propertyJeff Epler
This lets a music player show it vu-meter style
2019-12-29Merge branch 'master' into pixelbuf-subscr-changeRoy Hooper
2019-12-24MP3File: tweak buffer handlingJeff Epler
After adding the ability to change files in an existing MP3File object, it became apparent that at the beginning of a track some part of an existing buffer was playing first. I noticed that in get_buffer, the just-populated buffer wasn't being returned, but the other one was. But still after fixing this, I heard wrong audio at the beginning of a track, so I took the heavy duty approach and zeroed the buffers out. That means there's a remaining bug to chase, which is merely hidden by the memset()s.
2019-12-23MP3File: whitespaceJeff Epler
2019-12-23MP3File: Add a settable ".file" propertyJeff Epler
This enables jeplayer to allocate just one MP3File at startup, rather than have to make repeated large allocations while the application is running. The buffers have to be allocated their theoretical maximum, but that doesn't matter much as all the real-life MP3 files I checked needed that much allocation anyway.
2019-12-16displayio: make 'rotation' property settableJeff Epler
2019-12-13MP3: look harder for frame infoJeff Epler
Apparently sometimes, a proper "frame info" block is not found after a "sync word". Keep looking for one as needed, instead of giving up after one try. This was one reason that the "bartlebeats" mp3s would not play.
2019-12-13MP3: skip ID3V2 metadataJeff Epler
This was one reason that the "bartlebeats" mp3s would not play.
2019-12-13audiocore: The arguments to reset_buffer went missingJeff Epler
In conversion I missed these arguments were being passed, but noticed it when an implausible value for audio_channel was sent to mp3's reset_buffer method. It's not clear whether there was any negative impact to this, but it should be fixed!
2019-12-13Revert subscr signature changeRoy Hooper
2019-12-13Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-12-12MP3File: Fix stereo playback on samd AudioOutJeff Epler
There were several problems with the way this worked -- the read_count approach was too complicated and I made a mistake "simplifying" it from WaveFile. And when the right channel was returned, it was off by 1 byte, making it into static. Instead, directly track which is the "other" channel that has data available, and by using the right data type make the "+ channel" arithmetic give the right result. This requires a double cast (int16_t*)(void*) due to an alignment warning; the alignment is now ensured manually, but the compiler doesn't make the necessary inference that the low address bit must be clear.
2019-12-11MP3File: Avoid crash in get_buffer when deinittedJeff Epler
When a playing mp3 is deinitted, it's possible to reach get_buffer, but all the internal pointers are NULL. This would lead to a hard fault. Avoid it by returning GET_BUFFER_ERROR instead.
2019-12-10Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-12-10Fix slice step.Roy Hooper
2019-12-10audiocore: Add MP3File using Adafruit_MP3 libraryJeff Epler
2019-12-09Merge pull request #2353 from jepler/audiosample-protocolScott Shawcroft
Convert audiosamples to use micropython "protocols" (safely)
2019-12-06audiocore: use mp_obj_t in prototypesJeff Epler
2019-12-05audiocore: restore the prototypes of audiosample_xxx functionsJeff Epler
2019-12-05Define polarity and phase in FourwireHierophect
2019-12-04audiosample: convert to use a protocolJeff Epler
This eases addition of new sample sources, since the manual virtual function dispatch functions are just calls via a protocol
2019-12-02Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-11-29Merge remote-tracking branch 'origin/master' into tick-refactorJeff Epler
2019-11-27make UART.write be blocking on SAMD; add timeout propertyDan Halbert
2019-11-26remove unnecessary intermediate mp_obj_subscr wrapperRoy Hooper
2019-11-26Fix ePaper so it works after a GC.Scott Shawcroft
We weren't correctly collecting the start and stop sequences. As a result, the GC would free the space and allocate other info there. Thanks to JacobT on Discord for the bug report!
2019-11-23Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-11-18Supervisor: move most of systick to the supervisorJeff Epler
This code is shared by most parts, except where not all the #ifdefs inside the tick function were present in all ports. This mostly would have broken gamepad tick support on non-samd ports. The "ms32" and "ms64" variants of the tick functions are introduced because there is no 64-bit atomic read. Disabling interrupts avoids a low probability bug where milliseconds could be off by ~49.5 days once every ~49.5 days (2^32 ms). Avoiding disabling interrupts when only the low 32 bits are needed is a minor optimization. Testing performed: on metro m4 express, USB still works and time.monotonic_ns() still counts up
2019-11-15Add never_reset and reset to pin common hal, adjust filesHierophect
2019-11-08Fixed I2CDisplay reset issueMelissa LeBlanc-Williams
2019-11-01Merge remote-tracking branch 'adafruit/master' into bleio_tweaksScott Shawcroft
2019-10-26bitbangio.SPI was not setting direction of output pinsDan Halbert
2019-10-22Fix build by removing unused varsScott Shawcroft
2019-10-21Refine _bleioScott Shawcroft
This PR refines the _bleio API. It was originally motivated by the addition of a new CircuitPython service that enables reading and modifying files on the device. Moving the BLE lifecycle outside of the VM motivated a number of changes to remove heap allocations in some APIs. It also motivated unifying connection initiation to the Adapter class rather than the Central and Peripheral classes which have been removed. Adapter now handles the GAP portion of BLE including advertising, which has moved but is largely unchanged, and scanning, which has been enhanced to return an iterator of filtered results. Once a connection is created (either by us (aka Central) or a remote device (aka Peripheral)) it is represented by a new Connection class. This class knows the current connection state and can discover and instantiate remote Services along with their Characteristics and Descriptors. Relates to #586
2019-10-20fix show and fix step > 1Roy Hooper
2019-10-03Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-09-12Merge remote-tracking branch 'origin/master' into audio-stuttering-backgroundjepler
2019-09-10Merge pull request #2127 from jepler/nrf-i2sScott Shawcroft
nrf: Add i2s audio output
2019-09-09Merge pull request #2129 from jepler/audiomixer-debuggingDan Halbert
audiomixer: Supply constants in a way "-Og" optimization expects
2019-09-09os_listdir: This can be long-running, run background tasksjepler
While finding sources of clicks and buzzes in nrf i2sout, I identified this site as one which could be long running. Reproducer code was to play a 22.05kHz sample and repeatedly print `os.listdir('')`
2019-09-09Merge pull request #2101 from matthewnewberg/display_io_ditherScott Shawcroft
Add random dithering to ColorConverter
2019-09-08WaveFile: Return GET_BUFFER_ERROR if wrong amount readjepler
Closes: #2128
2019-09-08audiomixer: Supply constants in a way "-Og" optimization expectsjepler
These arguments are constrained to be compile-time constants, a fact that gcc complains about under "-Og" optimization, but not in normal builds. Declare them as enumerated types
2019-09-05Move dither parameter to ColorConverter constructor and parameterMatthew Newberg
2019-09-04Merge remote-tracking branch 'adafruit/master' into choose-usb-devices-xacDan Halbert
2019-09-04Removed unused return value in displayio_colorconverter_convertMatthew Newberg
2019-09-04Merge pull request #2113 from tannewt/displayio_hidden5.0.0-alpha.2Dan Halbert
Add .hidden to TileGrid and Group