SDDC_Driver
Loading...
Searching...
No Matches
libsddc
wavehdr.h
1
/*
2
* Copyright (C) 2019 by Hayati Ayguen <h_ayguen@web.de>
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef __WAVEHDR_H
19
#define __WAVEHDR_H
20
21
#include <stdint.h>
22
#include <stdio.h>
23
#include <time.h>
24
25
#pragma pack(push)
26
#pragma pack(1)
27
28
typedef
struct
29
{
30
char
ID[4];
31
uint32_t size;
32
}
chunk_hdr
;
33
34
typedef
struct
35
{
36
uint16_t wYear;
/* 1601 through 30827 */
37
uint16_t wMonth;
/* 1..12 */
38
uint16_t wDayOfWeek;
/* 0 .. 6: 0 == Sunday, .., 6 == Saturday */
39
uint16_t wDay;
/* 1 .. 31 */
40
uint16_t wHour;
/* 0 .. 23 */
41
uint16_t wMinute;
/* 0 .. 59 */
42
uint16_t wSecond;
/* 0 .. 59 */
43
uint16_t wMilliseconds;
/* 0 .. 999 */
44
}
Wind_SystemTime
;
45
46
47
typedef
struct
48
{
49
/* RIFF header */
50
chunk_hdr
hdr;
/* ID == "RIFF" string, size == full filesize - 8 bytes (maybe with some byte missing...) */
51
char
waveID[4];
/* "WAVE" string */
52
}
riff_chunk
;
53
54
typedef
struct
55
{
56
/* FMT header */
57
chunk_hdr
hdr;
/* ID == "fmt " */
58
int16_t wFormatTag;
59
int16_t nChannels;
60
int32_t nSamplesPerSec;
61
int32_t nAvgBytesPerSec;
62
int16_t nBlockAlign;
63
int16_t nBitsPerSample;
64
}
fmt_chunk
;
65
66
typedef
struct
67
{
68
/* auxi header - used by SpectraVue / rfspace / HDSDR / ELAD FDM .. */
69
chunk_hdr
hdr;
/* ="auxi" (chunk rfspace) */
70
Wind_SystemTime
StartTime;
71
Wind_SystemTime
StopTime;
72
uint32_t centerFreq;
/* receiver center frequency */
73
uint32_t ADsamplerate;
/* A/D sample frequency before downsampling */
74
uint32_t IFFrequency;
/* IF freq if an external down converter is used */
75
uint32_t Bandwidth;
/* displayable BW if you want to limit the display to less than Nyquist band */
76
int32_t IQOffset;
/* DC offset of the I and Q channels in 1/1000's of a count */
77
int32_t Unused2;
78
int32_t Unused3;
79
int32_t Unused4;
80
int32_t Unused5;
81
}
auxi_chunk
;
82
83
typedef
struct
84
{
85
/* DATA header */
86
chunk_hdr
hdr;
/* ="data" */
87
}
data_chunk
;
88
89
typedef
struct
90
{
91
riff_chunk
r;
92
fmt_chunk
f;
93
auxi_chunk
a;
94
data_chunk
d;
95
}
waveFileHeader
;
96
97
#pragma pack(pop)
98
99
#endif
/* __WAVEHDR_H */
100
101
// vim: tabstop=8:softtabstop=8:shiftwidth=8:noexpandtab
102
Wind_SystemTime
Definition
wavehdr.h:35
auxi_chunk
Definition
wavehdr.h:67
chunk_hdr
Definition
wavehdr.h:29
data_chunk
Definition
wavehdr.h:84
fmt_chunk
Definition
wavehdr.h:55
riff_chunk
Definition
wavehdr.h:48
waveFileHeader
Definition
wavehdr.h:90
Generated by
1.12.0