1 /* libSoX ADPCM codecs: IMA, OKI, CL. (c) 2007-8 robs@users.sourceforge.net
3 * This library is free software; you can redistribute it and/or modify it
4 * under the terms of the GNU Lesser General Public License as published by
5 * the Free Software Foundation; either version 2.1 of the License, or (at
6 * your option) any later version.
8 * This library is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
11 * General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
34 void lsx_adpcm_init(adpcm_t
* p
, int type
, int first_sample
);
35 int lsx_adpcm_decode(int code
, adpcm_t
* p
);
36 int lsx_adpcm_encode(int sample
, adpcm_t
* p
);
41 uint8_t byte
; /* write store */
48 void lsx_adpcm_reset(adpcm_io_t
* state
, sox_encoding_t type
);
49 int lsx_adpcm_oki_start(sox_format_t
* ft
, adpcm_io_t
* state
);
50 int lsx_adpcm_ima_start(sox_format_t
* ft
, adpcm_io_t
* state
);
51 size_t lsx_adpcm_read(sox_format_t
* ft
, adpcm_io_t
* state
, sox_sample_t
*buffer
, size_t len
);
52 int lsx_adpcm_stopread(sox_format_t
* ft
, adpcm_io_t
* state
);
53 size_t lsx_adpcm_write(sox_format_t
* ft
, adpcm_io_t
* state
, const sox_sample_t
*buffer
, size_t length
);
54 void lsx_adpcm_flush(sox_format_t
* ft
, adpcm_io_t
* state
);
55 int lsx_adpcm_stopwrite(sox_format_t
* ft
, adpcm_io_t
* state
);