-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2214f43
commit 9a970ad
Showing
6 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
project(astra) | ||
|
||
add_executable(astra) | ||
|
||
target_sources(astra | ||
PRIVATE | ||
main.cpp | ||
) | ||
|
||
target_link_libraries(astra | ||
PRIVATE | ||
daisy | ||
mc::audio | ||
) | ||
|
||
set_target_properties(astra PROPERTIES | ||
SUFFIX | ||
".elf" | ||
LINK_DEPENDS | ||
${LINKER_SCRIPT} | ||
) | ||
|
||
target_link_options(astra PUBLIC | ||
-T ${LINKER_SCRIPT} | ||
-Wl,-Map=astra.map,--cref | ||
-Wl,--check-sections | ||
-Wl,--unresolved-symbols=report-all | ||
-Wl,--warn-common | ||
-Wl,--warn-section-align | ||
-Wl,--print-memory-usage | ||
) | ||
|
||
add_custom_command(TARGET astra POST_BUILD | ||
COMMAND | ||
${CMAKE_OBJCOPY} | ||
ARGS | ||
-O ihex -S $<TARGET_FILE:astra> $<TARGET_FILE_BASE_NAME:astra>.hex | ||
BYPRODUCTS | ||
astra.hex | ||
COMMENT | ||
"Generating HEX image" | ||
VERBATIM | ||
) | ||
|
||
add_custom_command(TARGET astra POST_BUILD | ||
COMMAND | ||
${CMAKE_OBJCOPY} | ||
ARGS | ||
-O binary -S $<TARGET_FILE:astra> $<TARGET_FILE_BASE_NAME:astra>.bin | ||
WORKING_DIRECTORY | ||
$<TARGET_FILE_DIR:astra> | ||
BYPRODUCTS | ||
astra.bin | ||
COMMENT | ||
"Generating binary image" | ||
VERBATIM | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include <daisy_patch_sm.h> | ||
|
||
namespace astra | ||
{ | ||
|
||
static constexpr auto BLOCK_SIZE = 16U; | ||
static constexpr auto SAMPLE_RATE = 96'000.0F; | ||
|
||
auto patch = daisy::patch_sm::DaisyPatchSM{}; | ||
|
||
auto audioCallback(daisy::AudioHandle::InputBuffer in, daisy::AudioHandle::OutputBuffer out, size_t size) -> void | ||
{ | ||
patch.ProcessAllControls(); | ||
|
||
for (size_t i = 0; i < size; ++i) | ||
{ | ||
auto const left = IN_L[i]; | ||
auto const right = IN_R[i]; | ||
|
||
OUT_L[i] = left; | ||
OUT_R[i] = right; | ||
} | ||
} | ||
|
||
} // namespace astra | ||
|
||
auto main() -> int | ||
{ | ||
using namespace astra; | ||
|
||
patch.Init(); | ||
patch.SetAudioSampleRate(SAMPLE_RATE); | ||
patch.SetAudioBlockSize(BLOCK_SIZE); | ||
patch.StartAudio(audioCallback); | ||
|
||
while (true) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
project(hades) | ||
|
||
add_executable(hades) | ||
|
||
target_sources(hades | ||
PRIVATE | ||
main.cpp | ||
) | ||
|
||
target_link_libraries(hades | ||
PRIVATE | ||
daisy | ||
mc::audio | ||
) | ||
|
||
set_target_properties(hades PROPERTIES | ||
SUFFIX | ||
".elf" | ||
LINK_DEPENDS | ||
${LINKER_SCRIPT} | ||
) | ||
|
||
target_link_options(hades PUBLIC | ||
-T ${LINKER_SCRIPT} | ||
-Wl,-Map=hades.map,--cref | ||
-Wl,--check-sections | ||
-Wl,--unresolved-symbols=report-all | ||
-Wl,--warn-common | ||
-Wl,--warn-section-align | ||
-Wl,--print-memory-usage | ||
) | ||
|
||
add_custom_command(TARGET hades POST_BUILD | ||
COMMAND | ||
${CMAKE_OBJCOPY} | ||
ARGS | ||
-O ihex -S $<TARGET_FILE:hades> $<TARGET_FILE_BASE_NAME:hades>.hex | ||
BYPRODUCTS | ||
hades.hex | ||
COMMENT | ||
"Generating HEX image" | ||
VERBATIM | ||
) | ||
|
||
add_custom_command(TARGET hades POST_BUILD | ||
COMMAND | ||
${CMAKE_OBJCOPY} | ||
ARGS | ||
-O binary -S $<TARGET_FILE:hades> $<TARGET_FILE_BASE_NAME:hades>.bin | ||
WORKING_DIRECTORY | ||
$<TARGET_FILE_DIR:hades> | ||
BYPRODUCTS | ||
hades.bin | ||
COMMENT | ||
"Generating binary image" | ||
VERBATIM | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include <daisy_patch_sm.h> | ||
|
||
namespace hades | ||
{ | ||
|
||
static constexpr auto BLOCK_SIZE = 16U; | ||
static constexpr auto SAMPLE_RATE = 96'000.0F; | ||
|
||
auto patch = daisy::patch_sm::DaisyPatchSM{}; | ||
|
||
auto audioCallback(daisy::AudioHandle::InputBuffer in, daisy::AudioHandle::OutputBuffer out, size_t size) -> void | ||
{ | ||
patch.ProcessAllControls(); | ||
|
||
for (size_t i = 0; i < size; ++i) | ||
{ | ||
auto const left = IN_L[i]; | ||
auto const right = IN_R[i]; | ||
|
||
OUT_L[i] = left; | ||
OUT_R[i] = right; | ||
} | ||
} | ||
|
||
} // namespace hades | ||
|
||
auto main() -> int | ||
{ | ||
using namespace hades; | ||
|
||
patch.Init(); | ||
patch.SetAudioSampleRate(SAMPLE_RATE); | ||
patch.SetAudioBlockSize(BLOCK_SIZE); | ||
patch.StartAudio(audioCallback); | ||
|
||
while (true) {} | ||
} |