Comments (4)
I implemented it like this: https://github.com/TheNitek/RfidShelf/blob/25d03f8f40259af9c3f79db7839ce8766bed2723/RfidShelf/src/ShelfPlayback.cpp#L329 using the patch from here: https://github.com/madsci1016/Sparkfun-MP3-Player-Shield-Arduino-Library/tree/master/plugins (which also includes a perl file to convert the files from vlsi.fi)
from adafruit_vs1053_library.
Thank you, I did my best but doesn't seem to work. I copied that _patchVS1053() function into my Arduino script to just call it locally. Had to tweak a couple things like
sdfat::File32 file = _SD.open("patches.053", sdfat::O_READ); if (!file.isOpen()) { return false; }
to
File file = SD.open("/pshift.053", O_READ); if (!file) { return false; }
Doesn't throw any errors, but it doesn't seem to load. I tried the patches.053 and pshift.053 files.
Any good ways to simply use the original .plg file from https://www.vlsi.fi/en/support/software/vs10xxpatches.html ?
from adafruit_vs1053_library.
Here's how I did it - maybe this helps?
from adafruit_vs1053_library.
18 months later, here's the solution I used. The patches I used were downloaded from VLSI's web page at https://www.vlsi.fi/en/support/software/vs10xxpatches.html
I downloaded the vs1053b-patches290.zip file from the "VS1053b Patches w/ FLAC Decoder" section. When you look inside that ZIP, there are a bunch of .c
files. Pick which one you want and extract it to your project. You'll need to rename it to a .cpp
file, because it's going to works with the classes in Adafruit_VS1053.h
It'll have a small routine at the top that is #if 0
ed out. and a couple of arrays: unsigned char atab[];
and unsigned short dtab[];
. Leave all that alone, but first add the following #include
s at the top:
#include <Arduino.h>
#include <SPI.h>
#include <SD.h>
#include <Adafruit_VS1053.h>
Then go to the bottom and append the following subroutine:
void VS1053Patch(Adafruit_VS1053_FilePlayer &musicPlayer)
{
int i;
for (i = 0; i < CODE_SIZE; i++)
{
musicPlayer.sciWrite(atab[i], dtab[i]);
}
}
It'll probably also work if the type of the parameter is Adafruit_VS1053
, since it only actually cares about one routine in there, and it's inherited from the base Adafruit_VS1053
class.
Add a prototype for that function to your main sketch, and call it immediately after you initially begin()
the player, or any time you do a hard or soft reset on it.
I could probably hack together a script to convert the data in the .c
file to something that the applyPatch()
routine would accept, but I can't be bothered. In the grand scheme of things, the memory saving would be so miniscule by comparison with the ram available on the ESP32-S2 I'm using that it's just not worth my time.
from adafruit_vs1053_library.
Related Issues (20)
- Millis() function is extremely inaccurate when playing audio on Feather M0 HOT 2
- "Adafruit_VS1053.cpp" problem with "feather_player" exemple HOT 2
- record_ogg example does not support multiple recordings without reset HOT 2
- setVolume ranges? HOT 1
- Travis Build Broken HOT 1
- Error in compilation for Arduino Uno WiFi Rev2 HOT 2
- Compiler error when using a Arduino Nano Every (ATMega4809) HOT 4
- Problem with begin() HOT 1
- Not really a issue but.. HOT 7
- custom SPI pins not working on ESP32 HOT 29
- Convert to BusIO HOT 1
- Strange error occurs once and again while using Music Maker
- Increase SPI clock? HOT 1
- Please fix sdfat HOT 4
- Does not work on ESP32 HOT 7
- Using SDfat on RP2040 (earlephilhower core) HOT 1
- Issue with Ogg Recording Example on VS1053 Breakout Board
- Playback stops (but not fully) when changing volume too quickly
- Possible Code Modifications for Adafruit_VS1053 Files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_vs1053_library.