diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-05-10 13:06:20 +1000 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-05-10 13:06:20 +1000 |
| commit | 3f177cdb8880abf199f4445f1398cd69fb813892 (patch) | |
| tree | e20de4949b1344c826e5af41ab701f3db75b21bc /src/tasks/tasks.cpp | |
| parent | 8019c7691889cde4c3d40bbd78d485a92d713bbf (diff) | |
| parent | e4ce7c4ac23402e09be8d6a52e0f739c0dff4ff0 (diff) | |
| download | tangara-fw-3f177cdb8880abf199f4445f1398cd69fb813892.tar.gz | |
Merge branch 'main' into file-browser
Diffstat (limited to 'src/tasks/tasks.cpp')
| -rw-r--r-- | src/tasks/tasks.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tasks/tasks.cpp b/src/tasks/tasks.cpp index aa382655..d3937c68 100644 --- a/src/tasks/tasks.cpp +++ b/src/tasks/tasks.cpp @@ -33,12 +33,12 @@ auto Name<Type::kAudioConverter>() -> std::pmr::string { } template <Type t> -auto AllocateStack() -> cpp::span<StackType_t>; +auto AllocateStack() -> std::span<StackType_t>; // Decoders often require a very large amount of stack space, since they aren't // usually written with embedded use cases in mind. template <> -auto AllocateStack<Type::kAudioDecoder>() -> cpp::span<StackType_t> { +auto AllocateStack<Type::kAudioDecoder>() -> std::span<StackType_t> { constexpr std::size_t size = 20 * 1024; static StackType_t sStack[size]; return {sStack, size}; @@ -46,14 +46,14 @@ auto AllocateStack<Type::kAudioDecoder>() -> cpp::span<StackType_t> { // LVGL requires only a relatively small stack. Lua's stack is allocated // separately. template <> -auto AllocateStack<Type::kUi>() -> cpp::span<StackType_t> { +auto AllocateStack<Type::kUi>() -> std::span<StackType_t> { constexpr std::size_t size = 14 * 1024; static StackType_t sStack[size]; return {sStack, size}; } template <> // PCM conversion and resampling uses a very small amount of stack. -auto AllocateStack<Type::kAudioConverter>() -> cpp::span<StackType_t> { +auto AllocateStack<Type::kAudioConverter>() -> std::span<StackType_t> { constexpr std::size_t size = 4 * 1024; static StackType_t sStack[size]; return {sStack, size}; @@ -63,7 +63,7 @@ auto AllocateStack<Type::kAudioConverter>() -> cpp::span<StackType_t> { // cases, where large stack usage isn't so much of a concern. It therefore uses // an eye-wateringly large amount of stack. template <> -auto AllocateStack<Type::kBackgroundWorker>() -> cpp::span<StackType_t> { +auto AllocateStack<Type::kBackgroundWorker>() -> std::span<StackType_t> { std::size_t size = 64 * 1024; return {static_cast<StackType_t*>(heap_caps_malloc(size, MALLOC_CAP_SPIRAM)), size}; |
