2017-02-01 19:54:22 +01:00
|
|
|
#
|
|
|
|
/*
|
2017-02-24 22:29:06 +01:00
|
|
|
* Copyright (C) 2013 .. 2017
|
2023-11-15 11:17:33 +01:00
|
|
|
* updated 2023
|
|
|
|
*
|
2017-02-01 19:54:22 +01:00
|
|
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
2021-04-22 14:55:13 +02:00
|
|
|
* Lazy Chair Computing
|
2017-02-01 19:54:22 +01:00
|
|
|
*
|
2017-02-19 21:30:39 +01:00
|
|
|
* This file is part of the DAB-library
|
2021-04-22 14:55:13 +02:00
|
|
|
*
|
2017-02-19 21:30:39 +01:00
|
|
|
* DAB-library is free software; you can redistribute it and/or modify
|
2017-02-01 19:54:22 +01:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2017-02-19 21:30:39 +01:00
|
|
|
* DAB-library is distributed in the hope that it will be useful,
|
2017-02-01 19:54:22 +01:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2017-02-19 21:30:39 +01:00
|
|
|
* along with DAB-library-J; if not, write to the Free Software
|
2017-02-01 19:54:22 +01:00
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
#
|
|
|
|
/*
|
|
|
|
* MSC data
|
|
|
|
*/
|
|
|
|
#
|
2023-11-15 11:17:33 +01:00
|
|
|
#pragma once
|
2017-02-01 19:54:22 +01:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdint.h>
|
2018-07-14 19:59:30 +02:00
|
|
|
#include <thread>
|
2018-01-12 18:33:34 +01:00
|
|
|
#include <vector>
|
2017-02-01 19:54:22 +01:00
|
|
|
#include <mutex>
|
2018-02-18 17:26:00 +01:00
|
|
|
#include <atomic>
|
2017-02-01 19:54:22 +01:00
|
|
|
#include "dab-constants.h"
|
2017-02-19 21:30:39 +01:00
|
|
|
#include "dab-api.h"
|
2017-05-19 15:20:19 +02:00
|
|
|
#include "dab-params.h"
|
2018-07-14 19:59:30 +02:00
|
|
|
#include "freq-interleaver.h"
|
2017-02-01 19:54:22 +01:00
|
|
|
|
2018-02-04 20:24:54 +01:00
|
|
|
class virtualBackend;
|
2017-02-01 19:54:22 +01:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
class mscHandler {
|
|
|
|
public:
|
2021-04-22 14:55:13 +02:00
|
|
|
mscHandler (API_struct *,
|
2017-05-19 15:20:19 +02:00
|
|
|
void *);
|
2021-04-22 14:55:13 +02:00
|
|
|
~mscHandler ();
|
2023-11-15 11:17:33 +01:00
|
|
|
void process_mscBlock (std::vector<int16_t> &, int16_t);
|
2025-06-22 19:12:39 +02:00
|
|
|
void set_audioChannel (audiodata &);
|
|
|
|
void set_dataChannel (packetdata &);
|
2021-04-22 14:55:13 +02:00
|
|
|
void reset ();
|
|
|
|
void stop ();
|
|
|
|
void start ();
|
2017-02-01 19:54:22 +01:00
|
|
|
private:
|
2021-04-22 14:55:13 +02:00
|
|
|
API_struct *p;
|
2018-07-14 19:59:30 +02:00
|
|
|
dabParams params;
|
2017-05-19 15:20:19 +02:00
|
|
|
audioOut_t soundOut;
|
|
|
|
dataOut_t dataOut;
|
2017-08-02 13:13:21 +02:00
|
|
|
bytesOut_t bytesOut;
|
2017-05-19 15:20:19 +02:00
|
|
|
programQuality_t programQuality;
|
2018-01-12 18:33:34 +01:00
|
|
|
motdata_t motdata_Handler;
|
2017-05-19 15:20:19 +02:00
|
|
|
void *userData;
|
2018-07-14 19:59:30 +02:00
|
|
|
std::atomic<bool> running;
|
2023-11-15 11:17:33 +01:00
|
|
|
std::mutex locker;
|
2018-07-14 19:59:30 +02:00
|
|
|
std::vector<complex<float> > phaseReference;
|
2018-03-04 10:29:50 +01:00
|
|
|
std::vector<virtualBackend *>theBackends;
|
2017-02-01 19:54:22 +01:00
|
|
|
int16_t cifCount;
|
2018-02-18 17:26:00 +01:00
|
|
|
std::atomic<bool> work_to_do;
|
2017-02-01 19:54:22 +01:00
|
|
|
int16_t BitsperBlock;
|
|
|
|
int16_t numberofblocksperCIF;
|
|
|
|
};
|
|
|
|
|
|
|
|
|