diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-08 20:25:42 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-08 20:25:42 +1000 |
| commit | e1181fbe59a835ea9c93d6e067e9757e8c522d3c (patch) | |
| tree | 2fd61bb93713de8c2205b7b6d0a8c84c49832e93 /src/tasks/tasks.cpp | |
| parent | c3f40a8cc37114365ef3ec6f2888df64e5206b39 (diff) | |
| parent | 592f231627843bc44ebaaa4506aec26da1f56499 (diff) | |
| download | tangara-fw-e1181fbe59a835ea9c93d6e067e9757e8c522d3c.tar.gz | |
Merge branch 'main' into opus
Diffstat (limited to 'src/tasks/tasks.cpp')
| -rw-r--r-- | src/tasks/tasks.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tasks/tasks.cpp b/src/tasks/tasks.cpp index 861c7bf0..34c690f3 100644 --- a/src/tasks/tasks.cpp +++ b/src/tasks/tasks.cpp @@ -34,6 +34,10 @@ auto Name<Type::kAudio>() -> std::string { return "AUDIO"; } template <> +auto Name<Type::kMixer>() -> std::string { + return "MIXER"; +} +template <> auto Name<Type::kDatabase>() -> std::string { return "DB"; } @@ -77,6 +81,14 @@ auto AllocateStack<Type::kFileStreamer>() -> cpp::span<StackType_t> { size}; } +template <> +auto AllocateStack<Type::kMixer>() -> cpp::span<StackType_t> { + std::size_t size = 4 * 1024; + return {static_cast<StackType_t*>( + heap_caps_malloc(size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)), + size}; +} + // Leveldb is designed for non-embedded use cases, where stack space isn't so // much of a concern. It therefore uses an eye-wateringly large amount of stack. template <> @@ -105,6 +117,10 @@ auto Priority() -> UBaseType_t; // Realtime audio is the entire point of this device, so give this task the // highest priority. template <> +auto Priority<Type::kMixer>() -> UBaseType_t { + return 12; +} +template <> auto Priority<Type::kAudio>() -> UBaseType_t { return 11; } |
