This commit is contained in:
Aang23 2024-01-23 16:29:10 +01:00
commit 9cc911cc97
5 changed files with 72 additions and 36 deletions

View file

@ -192,57 +192,57 @@ jobs:
name: SatDump-Ubuntu-Latest
path: ${{runner.workspace}}/build/*.deb
# build_linux_arm64:
build_linux_arm64:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
# runs-on: ARM64
runs-on: ARM64
# steps:
# - uses: actions/checkout@v4
steps:
- uses: actions/checkout@v4
# - name: Update repositories
# run: sudo apt update
- name: Update repositories
run: sudo apt update
# - name: Install dependencies
# run: sudo apt install -y libglfw3-dev libfftw3-dev libvolk2-dev build-essential cmake pkgconf libjpeg-dev libpng-dev libairspy-dev libairspyhf-dev libhackrf-dev librtlsdr-dev libomp-dev libnng-dev libiio-dev libzstd-dev libad9361-dev libbladerf-dev libuhd-dev liblimesuite-dev ocl-icd-opencl-dev
- name: Install dependencies
run: sudo apt install -y libglfw3-dev libfftw3-dev libvolk2-dev build-essential cmake pkgconf libjpeg-dev libpng-dev libairspy-dev libairspyhf-dev libhackrf-dev librtlsdr-dev libomp-dev libnng-dev libiio-dev libzstd-dev libad9361-dev libbladerf-dev libuhd-dev liblimesuite-dev ocl-icd-opencl-dev
# - name: Delete build dir
# run: rm -rf ${{runner.workspace}}/build
- name: Delete build dir
run: rm -rf ${{runner.workspace}}/build
# - name: Create Build Environment
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
# run: cmake -E make_directory ${{runner.workspace}}/build
run: cmake -E make_directory ${{runner.workspace}}/build
# - name: Configure CMake
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
# shell: bash
# working-directory: ${{runner.workspace}}/build
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
# run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_LIVE=ON
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_LIVE=ON
# - name: Build
# working-directory: ${{runner.workspace}}/build
# shell: bash
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
# run: make -j4
run: make -j4
# - name: Package
# working-directory: ${{runner.workspace}}/build
# shell: bash
- name: Package
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
# run: make package
run: make package
# - name: Upload ZIP
# uses: actions/upload-artifact@v3
# with:
# name: SatDump-Pi64-Latest
# path: ${{runner.workspace}}/build/*.deb
- name: Upload ZIP
uses: actions/upload-artifact@v3
with:
name: SatDump-Pi64-Latest
path: ${{runner.workspace}}/build/*.deb
build_macos:
runs-on: macos-latest
@ -300,7 +300,7 @@ jobs:
# Yes, since I was asked to do like SDR++ for this I did look at how Ryzerth has done it :-)
update_nightly_release:
needs: ["build_windows", "build_linux", "build_macos"] #, "build_linux_arm64", "build_android"]
needs: ["build_windows", "build_linux", "build_macos", "build_linux_arm64"] #, "build_android"]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
@ -312,7 +312,7 @@ jobs:
run: sudo apt install -y unzip
- name: Copy files
run: mkdir satdump_out && cp SatDump-Ubuntu-Latest/satdump*.deb satdump_out/satdump_ubuntu_latest_amd64.deb && cp SatDump-macOS/SatDump-macOS.dmg satdump_out/SatDump-macOS.dmg && (cd SatDump-Windows_x64_Portable && zip -r ../satdump_out/SatDump-Windows_x64_Portable.zip *) && cp SatDump-Windows_x64_Installer/SatDump-*.exe satdump_out/SatDump-Windows_x64_Installer.exe # && cp SatDump-Pi64-Latest/satdump*.deb satdump_out/satdump_rpi64_latest_arm64.deb && cp SatDump-debug.apk/app-debug.apk satdump_out/SatDump-debug.apk
run: mkdir satdump_out && cp SatDump-Ubuntu-Latest/satdump*.deb satdump_out/satdump_ubuntu_latest_amd64.deb && cp SatDump-macOS/SatDump-macOS.dmg satdump_out/SatDump-macOS.dmg && (cd SatDump-Windows_x64_Portable && zip -r ../satdump_out/SatDump-Windows_x64_Portable.zip *) && cp SatDump-Windows_x64_Installer/SatDump-*.exe satdump_out/SatDump-Windows_x64_Installer.exe && cp SatDump-Pi64-Latest/satdump*.deb satdump_out/satdump_rpi64_latest_arm64.deb # && cp SatDump-debug.apk/app-debug.apk satdump_out/SatDump-debug.apk
- name: Update Nightly
run: gh release upload nightly satdump_out/* -R ${{github.repository}} --clobber

View file

@ -238,7 +238,7 @@
},
"sdrpp_noise_reduction": {
"type": "bool",
"value": false,
"value": true,
"name": "SDR++ Noise Reduction",
"description": "APT Noise Reduction originally from Ryzerth in SDR++. Performs quite well on APT!"
}
@ -257,4 +257,4 @@
}
}
}
}
}

View file

@ -12,6 +12,8 @@
#include "instruments/wbd_decoder.h"
#include "common/audio/audio_sink.h"
#include "common/dsp/io/wav_writer.h"
#include "core/config.h"
namespace cluster
{
@ -20,6 +22,7 @@ namespace cluster
CLUSTERInstrumentsDecoderModule::CLUSTERInstrumentsDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters)
: ProcessingModule(input_file, output_file_hint, parameters)
{
play_audio = satdump::config::main_cfg["user_interface"]["play_audio"]["value"].get<bool>();
}
void CLUSTERInstrumentsDecoderModule::process()
@ -46,7 +49,6 @@ namespace cluster
// Audio stuff
int16_t audio_buffer[4352];
bool enable_audio = false;
std::shared_ptr<audio::AudioSink> audio_sink;
if (input_data_type != DATA_FILE && audio::has_sink())
{
@ -105,7 +107,7 @@ namespace cluster
for (int i = 0; i < 4352; i++)
audio_buffer[i] = (int(majorframe.payload[i]) - 127) * 255;
if (enable_audio)
if (enable_audio && play_audio)
audio_sink->push_samples(audio_buffer, 4352);
if (majorframe.VCXO == 0)
@ -152,6 +154,9 @@ namespace cluster
}
}
if (enable_audio)
audio_sink->stop();
wave_writer_Ez.finish_header(final_data_size_ant_Ez);
wave_writer_Bx.finish_header(final_data_size_ant_Bx);
wave_writer_By.finish_header(final_data_size_ant_By);
@ -207,6 +212,32 @@ namespace cluster
ImGui::SameLine();
ImGui::Text("%d", param_commands);
if (enable_audio)
{
ImGui::Spacing();
const char* btn_icon, * label;
ImU32 color;
if (play_audio)
{
color = IM_COL32(0, 255, 0, 255);
btn_icon = u8"\uF028##wbdaudio";
label = "Audio Playing";
}
else
{
color = IM_COL32(255, 0, 0, 255);
btn_icon = u8"\uF026##wbdaudio";
label = "Audio Muted";
}
ImGui::PushStyleColor(ImGuiCol_Text, color);
if (ImGui::Button(btn_icon))
play_audio = !play_audio;
ImGui::PopStyleColor();
ImGui::SameLine();
ImGui::TextUnformatted(label);
}
if (input_data_type == DATA_FILE)
ImGui::ProgressBar((double)progress / (double)filesize, ImVec2(ImGui::GetWindowWidth() - 10, 20 * ui_scale));

View file

@ -14,6 +14,9 @@ namespace cluster
std::atomic<uint64_t> filesize;
std::atomic<uint64_t> progress;
bool enable_audio = false;
bool play_audio;
// Readers
// cips::CIPSReader cips_readers[4];
// totally not stolen AIM decoder.....

View file

@ -584,6 +584,7 @@
"channels": "cch4",
"lua": "scripted_compos/underlay_with_clouds.lua",
"description": "descriptions/MCIR.md",
"equalize": true,
"lua_vars": {
"minoffset": 0.05,
"scalar": 1.1,
@ -1148,7 +1149,7 @@
}
},
"124": {
"equation": "ch1, ch2, ch4",
"equation": "ch1, ch2, 1-ch4",
"description": "descriptions/124.md",
"geo_correct": true,
"white_balance": true,
@ -1219,6 +1220,7 @@
"channels": "ch4",
"lua": "scripted_compos/underlay_with_clouds.lua",
"description": "descriptions/MCIR.md",
"equalize": true,
"lua_vars": {
"minoffset": 0.45,
"scalar": 2.6,