Replay buffer size and samplerate adjustment

This commit is contained in:
furrtek
2017-06-24 18:42:41 +01:00
parent 33a2df9d2a
commit 46515ebb05
6 changed files with 36 additions and 26 deletions

View File

@@ -28,6 +28,9 @@
//TEST: Check AFSK transmit end, skips last bits ?
//TEST: Imperial in whipcalc
//BUG: CPLD-related rx ok, tx bad, see portapack.cpp lines 214+ to disable CPLD overlay
//BUG: REPLAY See what's wrong with quality (format, or need for interpolation filter ?)
//TODO: REPLAY Convert C16 to C8 on M0 core
//BUG: SCANNER Lock on frequency, if frequency jump, still locked on first one
//BUG: SCANNER Multiple slices
//BUG: REPLAY freezes when SD card not present

View File

@@ -25,10 +25,6 @@
#include "baseband_api.hpp"
#include "buffer_exchange.hpp"
// DEBUG:
#include "hackrf_gpio.hpp"
using namespace hackrf::one;
struct BasebandReplay {
BasebandReplay(ReplayConfig* const config) {
baseband::replay_start(config);
@@ -90,10 +86,7 @@ Optional<File::Error> ReplayThread::run() {
return read_result.error();
}
if (!buffers.put(buffer))
for(;;){}; // DEBUG
led_tx.toggle(); // DEBUG
buffers.put(buffer);
}
return { };

View File

@@ -91,7 +91,7 @@ void ReplayView::set_file_list(const std::vector<std::filesystem::path>& file_li
for (const auto& file : file_list) {
bbd_file.open("/" + file.string());
duration = bbd_file.size() / (2 * 2 * (sampling_rate / 8));
duration = bbd_file.size() / (2 * 2 * sampling_rate / 4);
file_options.emplace_back(file.string().substr(0, 8), duration);
}
options_files.set_options(file_options);

View File

@@ -59,7 +59,7 @@ private:
using option_t = std::pair<std::string, int32_t>;
using options_t = std::vector<option_t>;
static constexpr uint32_t sampling_rate = 1000000;
static constexpr uint32_t sampling_rate = 4000000;
void toggle();