Skip to content

Commit

Permalink
Merge pull request #2337 from jepler/mp3
Browse files Browse the repository at this point in the history
Add MP3 playback
  • Loading branch information
tannewt authored Dec 10, 2019
2 parents 387ab6c + a08d9e6 commit 024ba97
Show file tree
Hide file tree
Showing 31 changed files with 1,009 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@
[submodule "ports/cxd56/spresense-exported-sdk"]
path = ports/cxd56/spresense-exported-sdk
url = https://github.com/sonydevworld/spresense-exported-sdk.git
[submodule "lib/mp3"]
path = lib/mp3
url = https://github.com/adafruit/Adafruit_MP3
1 change: 1 addition & 0 deletions lib/mp3
Submodule mp3 added at 2a3cc7
6 changes: 5 additions & 1 deletion lib/oofatfs/ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -3382,7 +3382,11 @@ FRESULT f_read (
if (!sect) ABORT(fs, FR_INT_ERR);
sect += csect;
cc = btr / SS(fs); /* When remaining bytes >= sector size, */
if (cc) { /* Read maximum contiguous sectors directly */
if (cc
#if _FS_DISK_READ_ALIGNED
&& (((int)rbuff & 3) == 0)
#endif
) {/* Read maximum contiguous sectors directly */
if (csect + cc > fs->csize) { /* Clip at cluster boundary */
cc = fs->csize - csect;
}
Expand Down
6 changes: 6 additions & 0 deletions lib/oofatfs/ffconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,12 @@
/ SemaphoreHandle_t and etc.. A header file for O/S definitions needs to be
/ included somewhere in the scope of ff.h. */

// Set to nonzero if buffers passed to disk_read have a word alignment
// restriction
#ifndef _FS_DISK_READ_ALIGNED
#define _FS_DISK_READ_ALIGNED 0
#endif

/* #include <windows.h> // O/S definitions */


Expand Down
18 changes: 16 additions & 2 deletions locale/ID.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-06 13:25-0600\n"
"POT-Creation-Date: 2019-12-10 13:55-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -496,11 +496,21 @@ msgstr ""
msgid "Could not initialize UART"
msgstr "Tidak dapat menginisialisasi UART"

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate decoder"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate first buffer"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate input buffer"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate second buffer"
msgstr ""

Expand Down Expand Up @@ -613,6 +623,10 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Failed to parse MP3 file"
msgstr ""

#: ports/nrf/sd_mutex.c
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
Expand Down Expand Up @@ -1779,7 +1793,7 @@ msgstr "argumen keyword ekstra telah diberikan"
msgid "extra positional arguments given"
msgstr "argumen posisi ekstra telah diberikan"

#: shared-bindings/audiocore/WaveFile.c
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
Expand Down
18 changes: 16 additions & 2 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-06 13:25-0600\n"
"POT-Creation-Date: 2019-12-10 13:55-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -486,11 +486,21 @@ msgstr ""
msgid "Could not initialize UART"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate decoder"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate first buffer"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate input buffer"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate second buffer"
msgstr ""

Expand Down Expand Up @@ -602,6 +612,10 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Failed to parse MP3 file"
msgstr ""

#: ports/nrf/sd_mutex.c
#, c-format
msgid "Failed to release mutex, err 0x%04x"
Expand Down Expand Up @@ -1749,7 +1763,7 @@ msgstr ""
msgid "extra positional arguments given"
msgstr ""

#: shared-bindings/audiocore/WaveFile.c
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
Expand Down
18 changes: 16 additions & 2 deletions locale/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-06 13:25-0600\n"
"POT-Creation-Date: 2019-12-10 13:55-0600\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
Expand Down Expand Up @@ -490,11 +490,21 @@ msgstr "Beschädigter raw code"
msgid "Could not initialize UART"
msgstr "Konnte UART nicht initialisieren"

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate decoder"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate first buffer"
msgstr "Konnte first buffer nicht zuteilen"

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate input buffer"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate second buffer"
msgstr "Konnte second buffer nicht zuteilen"

Expand Down Expand Up @@ -606,6 +616,10 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr "Verbindung nicht erfolgreich: timeout"

#: shared-module/audiomp3/MP3File.c
msgid "Failed to parse MP3 file"
msgstr ""

#: ports/nrf/sd_mutex.c
#, c-format
msgid "Failed to release mutex, err 0x%04x"
Expand Down Expand Up @@ -1798,7 +1812,7 @@ msgstr "Es wurden zusätzliche Keyword-Argumente angegeben"
msgid "extra positional arguments given"
msgstr "Es wurden zusätzliche Argumente ohne Keyword angegeben"

#: shared-bindings/audiocore/WaveFile.c
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "Die Datei muss eine im Byte-Modus geöffnete Datei sein"
Expand Down
18 changes: 16 additions & 2 deletions locale/en_US.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-06 13:25-0600\n"
"POT-Creation-Date: 2019-12-10 13:55-0600\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -486,11 +486,21 @@ msgstr ""
msgid "Could not initialize UART"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate decoder"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate first buffer"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate input buffer"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate second buffer"
msgstr ""

Expand Down Expand Up @@ -602,6 +612,10 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Failed to parse MP3 file"
msgstr ""

#: ports/nrf/sd_mutex.c
#, c-format
msgid "Failed to release mutex, err 0x%04x"
Expand Down Expand Up @@ -1749,7 +1763,7 @@ msgstr ""
msgid "extra positional arguments given"
msgstr ""

#: shared-bindings/audiocore/WaveFile.c
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
Expand Down
18 changes: 16 additions & 2 deletions locale/en_x_pirate.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-06 13:25-0600\n"
"POT-Creation-Date: 2019-12-10 13:55-0600\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n"
Expand Down Expand Up @@ -490,11 +490,21 @@ msgstr ""
msgid "Could not initialize UART"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate decoder"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate first buffer"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate input buffer"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate second buffer"
msgstr ""

Expand Down Expand Up @@ -606,6 +616,10 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Failed to parse MP3 file"
msgstr ""

#: ports/nrf/sd_mutex.c
#, c-format
msgid "Failed to release mutex, err 0x%04x"
Expand Down Expand Up @@ -1753,7 +1767,7 @@ msgstr ""
msgid "extra positional arguments given"
msgstr ""

#: shared-bindings/audiocore/WaveFile.c
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr ""
Expand Down
18 changes: 16 additions & 2 deletions locale/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-06 13:25-0600\n"
"POT-Creation-Date: 2019-12-10 13:55-0600\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -494,11 +494,21 @@ msgstr ""
msgid "Could not initialize UART"
msgstr "No se puede inicializar la UART"

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate decoder"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate first buffer"
msgstr "No se pudo asignar el primer buffer"

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate input buffer"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate second buffer"
msgstr "No se pudo asignar el segundo buffer"

Expand Down Expand Up @@ -610,6 +620,10 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Failed to parse MP3 file"
msgstr ""

#: ports/nrf/sd_mutex.c
#, c-format
msgid "Failed to release mutex, err 0x%04x"
Expand Down Expand Up @@ -1802,7 +1816,7 @@ msgstr "argumento(s) por palabra clave adicionales fueron dados"
msgid "extra positional arguments given"
msgstr "argumento posicional adicional dado"

#: shared-bindings/audiocore/WaveFile.c
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "el archivo deberia ser una archivo abierto en modo byte"
Expand Down
18 changes: 16 additions & 2 deletions locale/fil.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-06 13:25-0600\n"
"POT-Creation-Date: 2019-12-10 13:55-0600\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <[email protected]>\n"
"Language-Team: fil\n"
Expand Down Expand Up @@ -495,11 +495,21 @@ msgstr ""
msgid "Could not initialize UART"
msgstr "Hindi ma-initialize ang UART"

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate decoder"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate first buffer"
msgstr "Hindi ma-iallocate ang first buffer"

#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate input buffer"
msgstr ""

#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3File.c
msgid "Couldn't allocate second buffer"
msgstr "Hindi ma-iallocate ang second buffer"

Expand Down Expand Up @@ -616,6 +626,10 @@ msgstr ""
msgid "Failed to connect: timeout"
msgstr ""

#: shared-module/audiomp3/MP3File.c
msgid "Failed to parse MP3 file"
msgstr ""

#: ports/nrf/sd_mutex.c
#, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x"
Expand Down Expand Up @@ -1810,7 +1824,7 @@ msgstr "dagdag na keyword argument na ibinigay"
msgid "extra positional arguments given"
msgstr "dagdag na positional argument na ibinigay"

#: shared-bindings/audiocore/WaveFile.c
#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3File.c
#: shared-bindings/displayio/OnDiskBitmap.c
msgid "file must be a file opened in byte mode"
msgstr "file ay dapat buksan sa byte mode"
Expand Down
Loading

0 comments on commit 024ba97

Please sign in to comment.