source: src/io/sndfileio.h @ 4e3723d

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since 4e3723d was 4e3723d, checked in by Paul Brossier <piem@piem.org>, 7 years ago

src/io/: add link to examples and missing c++ extern

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2  Copyright (C) 2003-2009 Paul Brossier <piem@aubio.org>
3
4  This file is part of aubio.
5
6  aubio is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10
11  aubio is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  GNU General Public License for more details.
15
16  You should have received a copy of the GNU General Public License
17  along with aubio.  If not, see <http://www.gnu.org/licenses/>.
18
19*/
20
21#ifndef SNDFILEIO_H
22#define SNDFILEIO_H
23
24/** \file
25
26  sndfile functions
27
28 */
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34/**
35 * sndfile object
36 */
37typedef struct _aubio_sndfile_t aubio_sndfile_t;
38/**
39 * Open a sound file for reading
40 */
41aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile);
42/**
43 * Copy file model from previously opened sound file.
44 */
45aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname);
46/**
47 * Open a sound file for writing
48 */
49int aubio_sndfile_open_wo (aubio_sndfile_t * file, const char * outputname);
50/**
51 * Read frames data from file into an array of buffers
52 */
53int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t ** read);
54/**
55 * Read frames data from file into a single buffer
56 */
57int aubio_sndfile_read_mono (aubio_sndfile_t * f, int frames, fvec_t * read);
58/**
59 * Write data of length frames to file
60 */
61int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t ** write);
62/**
63 * Close file and delete file object
64 */
65int del_aubio_sndfile(aubio_sndfile_t * file);
66/**
67 * Return some files facts
68 */
69void aubio_sndfile_info(aubio_sndfile_t * file);
70/**
71 * Return number of channel in file
72 */
73uint_t aubio_sndfile_channels(aubio_sndfile_t * file);
74/**
75 * Return samplerate of a file (Hz)
76 */
77uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file);
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif
84
Note: See TracBrowser for help on using the repository browser.