Compare commits

..

11 Commits

Author SHA1 Message Date
Ondřej Hruška 0e18330233 Adjust bluetooth volume change speed to more usable 2 months ago
leper 1e340b2cea Add ark pixel font's latin feature branch font. 2 months ago
Ondřej Hruška 4a50ed775e Make media buttons control use double click so it is less prone to accidental track skips 2 months ago
Ondřej Hruška 0e7f0732c5 Enable scroll wrap-around 2 months ago
Ondřej Hruška 0c7a8909c7 Changed volume to go in 5pct steps 2 months ago
ailurux 20ccf51d2b Merge pull request 'fix premature pause at end of last track of queue' (#317) from Be.ing/tangara-fw:premature_pause into main 2 months ago
ailurux 3804b2e2e8 Merge pull request 'Current theme reloading' (#324) from ayumi/tangara-fw:reload-theme into main 2 months ago
ayumi b87e991a1c Allow the WavPack’s output buffer to be optionally allocated in IRAM 2 months ago
ayumi 4890c7915c Add the missing WavPack decoder licence to the Licence screen 2 months ago
ayumi b8f13c804b
Add an option to reload the current theme 2 months ago
Be c4c6c9df7b fix premature pause at end of last track of queue 2 months ago
  1. 34
      lua/licenses.lua
  2. 28
      lua/settings.lua
  3. 2
      src/codecs/wavpack.cpp
  4. 3
      src/tangara/audio/audio_fsm.cpp
  5. 2
      src/tangara/audio/bt_audio_output.cpp
  6. 5
      src/tangara/audio/stream_cues.cpp
  7. 2
      src/tangara/audio/stream_cues.hpp

@ -62,19 +62,18 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.]])
end
local function xiphbsd(copyright)
local function bsd3(copyright, name)
show_license(copyright .. [[
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of ]] .. name .. [[ nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.]])
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.]])
end
local function apache(copyright)
@ -243,26 +242,31 @@ return function(self)
apache("Copyright 2022 Ronald Ross Miller")
end)
library("ogg", "BSD", function()
xiphbsd("Copyright (c) 2002, Xiph.org Foundation")
bsd3("Copyright (c) 2002, Xiph.org Foundation", "Xiph.org Foundation")
end)
library("Opus", "BSD", function()
xiphbsd(
"Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo")
bsd3(
"Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo",
"Xiph.org Foundation")
end)
library("Opusfile", "BSD", function()
xiphbsd("Copyright (c) 1994-2013 Xiph.Org Foundation and contributors")
bsd3("Copyright (c) 1994-2013 Xiph.Org Foundation and contributors", "Xiph.org Foundation")
end)
library("result", "MIT", function()
mit("Copyright (c) 2017-2021 Matthew Rodusek")
end)
library("speexdsp", "BSD", function()
xiphbsd(
"Copyright 2002-2008 Xiph.org Foundation, Copyright 2002-2008 Jean-Marc Valin, Copyright 2005-2007 Analog Devices Inc., Copyright 2005-2008 Commonwealth Scientific and Industrial Research, Organisation (CSIRO), Copyright 1993, 2002, 2006 David Rowe, Copyright 2003 EpicGames, Copyright 1992-1994 Jutta Degener, Carsten Bormann")
bsd3(
"Copyright 2002-2008 Xiph.org Foundation, Copyright 2002-2008 Jean-Marc Valin, Copyright 2005-2007 Analog Devices Inc., Copyright 2005-2008 Commonwealth Scientific and Industrial Research, Organisation (CSIRO), Copyright 1993, 2002, 2006 David Rowe, Copyright 2003 EpicGames, Copyright 1992-1994 Jutta Degener, Carsten Bormann",
"Xiph.org Foundation")
end)
library("tinyfsm", "MIT", function()
mit("Copyright (c) 2012-2022 Axel Burri")
end)
library("tremor", "BSD", function()
xiphbsd("Copyright (c) 2002, Xiph.org Foundation")
bsd3("Copyright (c) 2002, Xiph.org Foundation", "Xiph.org Foundation")
end)
library("WavPack", "BSD", function()
bsd3("Copyright (c) 1998 - 2006 Conifer Software, All rights reserved.", "Conifer Software")
end)
end

@ -406,24 +406,38 @@ settings.ThemeSettings = SettingsScreen:new {
selected_idx = idx
end
local theme_chooser = self.content:Dropdown {
local theme_container = self.content:Object {
w = lvgl.PCT(100),
h = lvgl.SIZE_CONTENT,
flex = {
flex_direction = "column",
justify_content = "flex-start",
align_items = "space-evenly",
align_content = "flex-start",
},
pad_row = 4,
}
theme_container:add_style(styles.list_item)
local theme_chooser = theme_container:Dropdown {
options = options,
symbol = img.chevron,
}
local theme_chooser_desc = widgets.Description(theme_chooser, "Theme")
theme_chooser:set({ selected = selected_idx })
theme_chooser:onevent(lvgl.EVENT.VALUE_CHANGED, function()
local theme_reload = function()
local option = theme_chooser:get('selected_str')
local selectedTheme = themeOptions[option]
if (selectedTheme) then
theme.load_theme(tostring(selectedTheme))
backstack.reset(main_menu:new())
end
end)
end
theme_chooser:set({ selected = selected_idx })
theme_chooser:onevent(lvgl.EVENT.VALUE_CHANGED, theme_reload)
theme_chooser:focus()
local theme_reload_btn = theme_container:Button {}
theme_reload_btn:Label { text = "Reload" }
theme_reload_btn:onClicked(theme_reload)
end
}

@ -45,7 +45,7 @@ WavPackDecoder::WavPackDecoder() : input_(), buf_() {
buf_ = static_cast<int32_t*>(
heap_caps_malloc(
kBufSize * sizeof(int32_t),
MALLOC_CAP_INTERNAL | MALLOC_CAP_CACHE_ALIGNED
MALLOC_CAP_INTERNAL | MALLOC_CAP_32BIT
));
}

@ -148,9 +148,7 @@ void AudioState::react(const QueueUpdate& ev) {
void AudioState::react(const SetTrack& ev) {
if (std::holds_alternative<std::monostate>(ev.new_track)) {
ESP_LOGI(kTag, "playback finished, awaiting drain");
sDecoder->open({});
sStreamCues.clear();
return;
}
@ -212,6 +210,7 @@ void AudioState::react(const TtsPlaybackChanged& ev) {
}
void AudioState::react(const internal::DecodingFinished& ev) {
ESP_LOGD(kTag, "end of file decoded; awaiting playback of buffered audio");
// If we just finished playing whatever's at the front of the queue, then we
// need to advanve and start playing the next one ASAP in order to continue
// gaplessly.

@ -32,7 +32,7 @@
namespace audio {
static constexpr uint16_t kVolumeRange = 60;
static constexpr uint16_t kVolumeStep = 5; // CUSTOM - added
static constexpr uint16_t kVolumeStep = 2; // CUSTOM - added
using ConnectionState = drivers::Bluetooth::ConnectionState;

@ -43,11 +43,6 @@ auto StreamCues::addCue(std::shared_ptr<TrackInfo> track, uint32_t sample)
}
}
auto StreamCues::clear() -> void {
upcoming_.clear();
current_ = {};
}
auto StreamCues::current() -> std::pair<std::shared_ptr<TrackInfo>, uint32_t> {
if (!current_) {
return {};

@ -34,8 +34,6 @@ class StreamCues {
auto addCue(std::shared_ptr<TrackInfo>, uint32_t start_at) -> void;
auto clear() -> void;
private:
uint32_t now_;

Loading…
Cancel
Save