CubicSDRDefs.h 1.79 KB
Newer Older
1 2 3
// Copyright (c) Charles J. Cliffe
// SPDX-License-Identifier: GPL-2.0+

4 5
#pragma once

6
#define CUBICSDR_TITLE "" CUBICSDR_BUILD_TITLE
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

#ifndef __BYTE_ORDER
    #ifdef _WIN32
        #define ATTRIBUTE
        #define __LITTLE_ENDIAN 1234
        #define __BIG_ENDIAN    4321
        #define __PDP_ENDIAN    3412
        #define __BYTE_ORDER __LITTLE_ENDIAN
    #else
        #ifdef __APPLE__
            #include <machine/endian.h>
        #else
            #include <endian.h>
        #endif
    #endif
#endif

const char filePathSeparator =
#ifdef _WIN32
                            '\\';
#else
                            '/';
#endif

#define BUF_SIZE (16384*6)

#define DEFAULT_SAMPLE_RATE 2500000
34 35

//
36
#define DEFAULT_FFT_SIZE 2048
37 38 39 40 41 42 43
#define DEFAULT_DMOD_FFT_SIZE (DEFAULT_FFT_SIZE / 2)
#define DEFAULT_SCOPE_FFT_SIZE (DEFAULT_FFT_SIZE / 2)

//Both must be a power of 2 to prevent terrible OpenGL performance.
//TODO: Make the waterfall resolutions an option.
#define DEFAULT_MAIN_WATERFALL_LINES_NB 512 // 1024
#define DEFAULT_DEMOD_WATERFALL_LINES_NB 256
44 45 46 47 48 49

#define DEFAULT_DEMOD_TYPE "FM"
#define DEFAULT_DEMOD_BW 200000

#define DEFAULT_WATERFALL_LPS 30

50 51 52 53 54
//Dmod waterfall lines per second is adjusted 
//so that the whole demod waterfall show DEMOD_WATERFALL_DURATION_IN_SECONDS
//seconds.
#define DEMOD_WATERFALL_DURATION_IN_SECONDS 4.0

55 56
#define CHANNELIZER_RATE_MAX 500000

57 58
#define MANUAL_SAMPLE_RATE_MIN 2000000 // 2MHz
#define MANUAL_SAMPLE_RATE_MAX 200000000 // 200MHz (We are 2017+ after all)
59

60 61
//Represents the amount of time to process in the FFT distributor. 
#define FFT_DISTRIBUTOR_BUFFER_IN_SECONDS 0.250
62 63 64 65

//The maximum number of listed sample rates for a device, to be able to handle 
//devices returning an insane amount because they have quasi-continuous ranges (UHD...)
#define DEVICE_SAMPLE_RATES_MAX_NB     25