From b0d0321eccfc7f6171e0d25b116e32167e99f600 Mon Sep 17 00:00:00 2001 From: Doug McLain Date: Sun, 26 Jun 2022 20:45:31 -0400 Subject: [PATCH] Fi crash for no audio input device, extract arch from abi and update readme --- README.md | 3 --- audioengine.h | 2 +- codec.cpp | 4 +++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9c35e8e..cf32d1a 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,6 @@ This software connects to M17, Fusion (YSF/FCS, DN and VW modes are supported), This software makes use of software from a number of other open source software projects, including MMDVMHost, MMDVM_CM, mvoice, and others. Not only is software from these projects being used directly, but learning about the various network protocols and encoding/decoding of the various protocols was only possible thanks to the authors of all of these software projects. -# DroidStar for iOS is no more -Apple recently made iOS SDK 15 the minimum requirement for apps on the app store. XCode 13 is required for this SDK, but macOS 11 is required for this version. My mac is a MacBook Pro 13 2012 which is unsupported by macOS 11, so I will no longer be able to provide an iOS version of DroidStar. I bought this MacBook, a used iphone 6s, and paid for a developer account all out of my own pocket to provide a free version of DroidStar for iOS. Since I have no other use for a mac or an iphone, at this time I have no plans to by new apple hardware. - # DudeStar, DroidStar, and Qt The DudeStar application used the Qt Widgets UI, while DroidStar uses the Qt Quick UI. All of the back end C/C++ source code for both projects has always been identical, but because of the different UI APIs, two repositories had to be maintained for the same project. Even though I prefer the Qt widgets UI over the Qt Quick UI for desktop applications, I have combined both projects into a single entity which is now simply called 'DroidStar'. My dudestar repo has been removed from github, but there are plenty of forks of it on github, in case anyone wishes to continue development of that version. diff --git a/audioengine.h b/audioengine.h index 1d304ae..2ac6db4 100644 --- a/audioengine.h +++ b/audioengine.h @@ -45,7 +45,7 @@ public: void set_output_buffer_size(uint32_t b) { m_out->setBufferSize(b); } void set_input_buffer_size(uint32_t b) { if(m_in != nullptr) m_in->setBufferSize(b); } void set_output_volume(qreal v){ m_out->setVolume(v); } - void set_input_volume(qreal v){ m_in->setVolume(v); } + void set_input_volume(qreal v){ if(m_in != nullptr) m_in->setVolume(v); } void set_agc(bool agc) { m_agc = agc; } bool frame_available() { return (m_audioinq.size() >= 320) ? true : false; } uint16_t read(int16_t *, int); diff --git a/codec.cpp b/codec.cpp index fb95e4d..8d6f10e 100644 --- a/codec.cpp +++ b/codec.cpp @@ -200,7 +200,9 @@ bool Codec::load_vocoder_plugin() #if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) QString voc = config_path + "/vocoder_plugin." + QSysInfo::productType() + "." + QSysInfo::currentCpuArchitecture(); #else - QString voc = config_path + "/vocoder_plugin." + QSysInfo::kernelType() + "." + QSysInfo::currentCpuArchitecture(); + QStringList l = QSysInfo::buildAbi().split('-'); + //QString voc = config_path + "/vocoder_plugin." + QSysInfo::kernelType() + "." + QSysInfo::currentCpuArchitecture(); + QString voc = config_path + "/vocoder_plugin." + QSysInfo::kernelType() + "." + l.at(0); #endif #if !defined(Q_OS_WIN) //QString voc = "/mnt/data/src/mbe_vocoder/vocoder_plugin.linux.x86_64.so";