Skip to content
Snippets Groups Projects
Commit bcd57529 authored by moon2's avatar moon2 :speech_balloon:
Browse files

bl00mbox: migration

bl00mbox and radspa have grown up. It is time for them to
gain independence in their very own repositories.

Check out gitlab.com/moon2embeddedaudio for future updates
or contributing.

We will continue to push updates to the flow3r project and
add hardware-specific features.

We see no reason to submodule it right away, but if it is
preferable for the flow3r firmware repo we're open to it.

Thanks for all the support and kind words, we'll try our
best to polish all the rough spots and add a ton of plugins
and features :D!
parent d9c434aa
No related branches found
No related tags found
No related merge requests found
Pipeline #7319 passed
...@@ -30,6 +30,4 @@ idf_component_register( ...@@ -30,6 +30,4 @@ idf_component_register(
plugins/bl00mbox plugins/bl00mbox
radspa radspa
extern extern
REQUIRES
st3m
) )
Hi! bl00mbox/radspa is an external project. To find out more or contribute check out https://gitlab.com/moon2embeddedaudio
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
#include "bl00mbox.h" #include "bl00mbox.h"
#include "bl00mbox_plugin_registry.h" #include "bl00mbox_plugin_registry.h"
#include "bl00mbox_audio.h" #include "bl00mbox_audio.h"
#include "st3m_audio.h"
void bl00mbox_init(){ void bl00mbox_init(){
bl00mbox_plugin_registry_init(); bl00mbox_plugin_registry_init();
st3m_audio_set_player_function(bl00mbox_audio_render);
bl00mbox_channels_init(); bl00mbox_channels_init();
} }
...@@ -246,14 +246,7 @@ void bl00mbox_audio_render(int16_t * rx, int16_t * tx, uint16_t len){ ...@@ -246,14 +246,7 @@ void bl00mbox_audio_render(int16_t * rx, int16_t * tx, uint16_t len){
#endif #endif
for(uint16_t i = 0; i < mono_len; i++){ for(uint16_t i = 0; i < mono_len; i++){
st3m_scope_write((acc[i])>>4);
tx[2*i] = acc[i]; tx[2*i] = acc[i];
tx[2*i+1] = acc[i]; tx[2*i+1] = acc[i];
} }
} }
// TEMP
void bl00mbox_player_function(int16_t * rx, int16_t * tx, uint16_t len){
bl00mbox_audio_render(rx, tx, len);
}
//SPDX-License-Identifier: CC0-1.0 //SPDX-License-Identifier: CC0-1.0
#pragma once #pragma once
//TODO: move this to kconfig someday //TODO: move this to kconfig someday?
#define BL00MBOX_MAX_BUFFER_LEN 256 #define BL00MBOX_MAX_BUFFER_LEN 128
#define BL00MBOX_DEFAULT_CHANNEL_VOLUME 3000 #define BL00MBOX_DEFAULT_CHANNEL_VOLUME 8000
#define BL00MBOX_CHANNELS 32 #define BL00MBOX_CHANNELS 32
#define BL00MBOX_BACKGROUND_MUTE_OVERRIDE_ENABLE #define BL00MBOX_BACKGROUND_MUTE_OVERRIDE_ENABLE
//TODO: remove st3m scope dependency
#include "st3m_audio.h"
#include "st3m_scope.h"
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
......
#include "st3m_audio.h" #include "st3m_audio.h"
#include "st3m_scope.h"
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
...@@ -320,6 +321,9 @@ static void _audio_player_task(void *data) { ...@@ -320,6 +321,9 @@ static void _audio_player_task(void *data) {
UNLOCK; UNLOCK;
(*function)(buffer_rx, buffer_tx, FLOW3R_BSP_AUDIO_DMA_BUFFER_SIZE * 2); (*function)(buffer_rx, buffer_tx, FLOW3R_BSP_AUDIO_DMA_BUFFER_SIZE * 2);
for (uint16_t i = 0; i < FLOW3R_BSP_AUDIO_DMA_BUFFER_SIZE; i++) {
st3m_scope_write(buffer_tx[2 * i] >> 2);
}
if (!hwmute && software_mute) { if (!hwmute && software_mute) {
// Software muting needed. Only used on P1. // Software muting needed. Only used on P1.
......
...@@ -131,6 +131,7 @@ void flow3r_startup(void) { ...@@ -131,6 +131,7 @@ void flow3r_startup(void) {
st3m_scope_init(); st3m_scope_init();
st3m_audio_init(); st3m_audio_init();
bl00mbox_init(); bl00mbox_init();
st3m_audio_set_player_function(bl00mbox_audio_render);
st3m_badgenet_init(); st3m_badgenet_init();
st3m_mode_set(st3m_mode_kind_starting, "micropython"); st3m_mode_set(st3m_mode_kind_starting, "micropython");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment