From 35ac8b76e4a939e86fbed90cf8790a2237928535 Mon Sep 17 00:00:00 2001 From: Franck ALARY Date: Tue, 14 Nov 2023 23:02:13 +0100 Subject: [PATCH] Fix mp3 player --- Makefile | 2 +- README.md | 6 +++--- src/storyTeller/music_player.h | 4 +++- static/build/.tmp_update/runtime.sh | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d80e24273..e194ea151 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ ########################################################### TARGET=Telmi Story Teller -VERSION=0.3.0 +VERSION=0.3.1 ########################################################### diff --git a/README.md b/README.md index 18c8d7135..7fd8cc898 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ The story teller is compatible with stories exported from [STUdio](https://githu ### Download the installation files -- [Download the latest version of Telmi](https://github.com/DantSu/Telmi-story-teller/releases/download/0.3.0/TelmiOS_v0.3.0.zip) +- [Download the latest version of Telmi](https://github.com/DantSu/Telmi-story-teller/releases/download/0.3.1/TelmiOS_v0.3.1.zip) ### Format your SD card as FAT32 (not exFAT!) @@ -46,9 +46,9 @@ Make sure you choose: `For use with all systems and devices (FAT)` Chrome already has a tool to format an SD card. Insert the card into your Chromebook, right-click it and click **Format Device**, make sure `FAT32` is selected under **Format** and click or tap **Erase & Format**. -### Unzip TelmiOS_v0.3.0.zip +### Unzip TelmiOS_v0.3.1.zip -Put the content of `TelmiOS_v0.3.0.zip` at the root of the SD card. +Put the content of `TelmiOS_v0.3.1.zip` at the root of the SD card. ### Power on your Miyoo diff --git a/src/storyTeller/music_player.h b/src/storyTeller/music_player.h index 2962b8d9a..d4ca8fc6f 100644 --- a/src/storyTeller/music_player.h +++ b/src/storyTeller/music_player.h @@ -31,10 +31,12 @@ void musicplayer_load(void) musicIndex = 0; } + double position = 0; + video_displayBlackScreen(); display_setScreen(false); autosleep_lock(); - audio_play(MUSICPLAYER_RESOURCES, musicList[musicIndex], 0); + audio_play(MUSICPLAYER_RESOURCES, musicList[musicIndex], &position); Mix_HookMusicFinished(callback_musicplayer_autoplay); } diff --git a/static/build/.tmp_update/runtime.sh b/static/build/.tmp_update/runtime.sh index 0c9e5a6d1..d8acc9de9 100644 --- a/static/build/.tmp_update/runtime.sh +++ b/static/build/.tmp_update/runtime.sh @@ -49,8 +49,9 @@ main() { # Init rm /tmp/.offOrder 2> /dev/null - HOME=/mnt/SDCARD/StoryTeller/ + HOME=/mnt/SDCARD/Stories/ + mkdir -m 777 -p /mnt/SDCARD/Saves storyteller_jpg2png bootScreen "Boot"