ref: 444f41c6fcdf4142c6bca1c6c76df2e4603a24a8
dir: /src/vox.c/
/* * SOX file format handler for Dialogic/Oki ADPCM VOX files. * * Copyright 1991-2007 Tony Seebregts And Sundry Contributors * * This source code is freely redistributable and may be used for any * purpose. This copyright notice must be maintained. * * Tony Seebregts And Sundry Contributors are not responsible for the * consequences of using this software. */ #include "sox_i.h" #include "vox.h" #include "adpcms.h" /* .vox doesn't need any private state over and above adpcm_io_t, so just have simple wrappers that pass it on directly. */ int sox_vox_start(ft_t ft) { return sox_adpcm_oki_start(ft, (adpcm_io_t)ft->priv); } int sox_ima_start(ft_t ft) { return sox_adpcm_ima_start(ft, (adpcm_io_t)ft->priv); } sox_size_t sox_vox_read(ft_t ft, sox_ssample_t *buffer, sox_size_t len) { return sox_adpcm_read(ft, (adpcm_io_t)ft->priv, buffer, len); } int sox_vox_stopread(ft_t ft) { return sox_adpcm_stopread(ft, (adpcm_io_t)ft->priv); } sox_size_t sox_vox_write(ft_t ft, const sox_ssample_t *buffer, sox_size_t length) { return sox_adpcm_write(ft, (adpcm_io_t)ft->priv, buffer, length); } int sox_vox_stopwrite(ft_t ft) { return sox_adpcm_stopwrite(ft, (adpcm_io_t)ft->priv); }