libosmodsp 0.4.0.12-f6f4 Osmocom DSP library

cfile.h
Go to the documentation of this file.
1/*
2 * cfile.h
3 *
4 * Helpers to read .cfile (complex samples from gnuradio)
5 *
6 * Copyright (C) 2011 Sylvain Munaut <tnt@246tNt.com>
7 *
8 * All Rights Reserved
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 */
24
25#ifndef __OSMO_DSP_CFILE_H__
26#define __OSMO_DSP_CFILE_H__
27
36#include <complex.h>
37
39 struct cfile {
40 float complex *data;
41 unsigned int len;
42 size_t _blen;
43};
44
45 struct cfile *cfile_load(const char *filename);
46 void cfile_release(struct cfile *cf);
47
50#endif /* __OSMO_DSP_CFILE_H__ */
cfile_release
void cfile_release(struct cfile *cf)
Release all resources associated with a mapped .cfile.
Definition: cfile.c:102
cfile_load
struct cfile * cfile_load(const char *filename)
.cfile loader: mmap() the data into memory (read-only)
Definition: cfile.c:50
cfile
Structure representing a currently mapped .cfile.
Definition: cfile.h:39
cfile::len
unsigned int len
Length (in samples) of the data.
Definition: cfile.h:41
cfile::_blen
size_t _blen
Length (in bytes) of the data.
Definition: cfile.h:42
cfile::data
float complex * data
Data array (read only !)
Definition: cfile.h:40