GNU Radio Manual and C++ API Reference
3.10.5.1
The Free & Open Software Radio Ecosystem
wavfile.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2008,2013 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
7
* SPDX-License-Identifier: GPL-3.0-or-later
8
*
9
*/
10
11
// This file stores all the RIFF file type knowledge for the wavfile_*
12
// gnuradio/blocks.
13
14
#ifndef _GR_WAVFILE_H_
15
#define _GR_WAVFILE_H_
16
17
#include <cstdio>
18
19
namespace
gr
{
20
namespace
blocks {
21
22
//! WAV file header information.
23
struct
wav_header_info
{
24
25
//! sample rate [S/s]
26
int
sample_rate
;
27
28
//! Number of channels
29
int
nchans
;
30
31
//! Bytes per sample
32
int
bytes_per_sample
;
33
34
//! Number of samples per channel
35
long
long
samples_per_chan
;
36
37
//! sndfile format
38
int
format
;
39
40
//! sndfile format
41
int
subformat
;
42
};
43
44
enum
wavfile_format_t
{
45
FORMAT_WAV
= 0x010000,
46
FORMAT_FLAC
= 0x170000,
47
FORMAT_OGG
= 0x200000,
48
FORMAT_RF64
= 0x220000,
49
};
50
51
enum
wavfile_subformat_t
{
52
FORMAT_PCM_S8
= 1,
53
FORMAT_PCM_16
,
54
FORMAT_PCM_24
,
55
FORMAT_PCM_32
,
56
FORMAT_PCM_U8
,
57
FORMAT_FLOAT
,
58
FORMAT_DOUBLE
,
59
FORMAT_VORBIS
= 0x0060,
60
FORMAT_OPUS
= 0x0064,
61
};
62
63
}
/* namespace blocks */
64
}
/* namespace gr */
65
66
typedef
gr::blocks::wavfile_format_t
wavfile_format_t
;
67
typedef
gr::blocks::wavfile_subformat_t
wavfile_subformat_t
;
68
69
#endif
/* _GR_WAVFILE_H_ */
gr::blocks::wavfile_subformat_t
wavfile_subformat_t
Definition:
wavfile.h:51
gr::blocks::FORMAT_PCM_24
@ FORMAT_PCM_24
Definition:
wavfile.h:54
gr::blocks::FORMAT_PCM_16
@ FORMAT_PCM_16
Definition:
wavfile.h:53
gr::blocks::FORMAT_PCM_U8
@ FORMAT_PCM_U8
Definition:
wavfile.h:56
gr::blocks::FORMAT_OPUS
@ FORMAT_OPUS
Definition:
wavfile.h:60
gr::blocks::FORMAT_PCM_S8
@ FORMAT_PCM_S8
Definition:
wavfile.h:52
gr::blocks::FORMAT_VORBIS
@ FORMAT_VORBIS
Definition:
wavfile.h:59
gr::blocks::FORMAT_PCM_32
@ FORMAT_PCM_32
Definition:
wavfile.h:55
gr::blocks::FORMAT_DOUBLE
@ FORMAT_DOUBLE
Definition:
wavfile.h:58
gr::blocks::FORMAT_FLOAT
@ FORMAT_FLOAT
Definition:
wavfile.h:57
gr::blocks::wavfile_format_t
wavfile_format_t
Definition:
wavfile.h:44
gr::blocks::FORMAT_RF64
@ FORMAT_RF64
Definition:
wavfile.h:48
gr::blocks::FORMAT_OGG
@ FORMAT_OGG
Definition:
wavfile.h:47
gr::blocks::FORMAT_FLAC
@ FORMAT_FLAC
Definition:
wavfile.h:46
gr::blocks::FORMAT_WAV
@ FORMAT_WAV
Definition:
wavfile.h:45
gr
GNU Radio logging wrapper.
Definition:
basic_block.h:29
gr::blocks::wav_header_info
WAV file header information.
Definition:
wavfile.h:23
gr::blocks::wav_header_info::nchans
int nchans
Number of channels.
Definition:
wavfile.h:29
gr::blocks::wav_header_info::samples_per_chan
long long samples_per_chan
Number of samples per channel.
Definition:
wavfile.h:35
gr::blocks::wav_header_info::bytes_per_sample
int bytes_per_sample
Bytes per sample.
Definition:
wavfile.h:32
gr::blocks::wav_header_info::sample_rate
int sample_rate
sample rate [S/s]
Definition:
wavfile.h:26
gr::blocks::wav_header_info::format
int format
sndfile format
Definition:
wavfile.h:38
gr::blocks::wav_header_info::subformat
int subformat
sndfile format
Definition:
wavfile.h:41
wavfile_format_t
gr::blocks::wavfile_format_t wavfile_format_t
Definition:
wavfile.h:66
wavfile_subformat_t
gr::blocks::wavfile_subformat_t wavfile_subformat_t
Definition:
wavfile.h:67
gr-blocks
include
gnuradio
blocks
wavfile.h
Generated by
1.9.4