/*
* Copyright (C) 2017 Tetsuya Isaki. All rights reserved.
* Copyright (C) 2017 Y.Sugahara (moveccr). All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Number of bits for internal format.
* XXX 32bit mode is not completed.
* XXX Is this necessary?
*/
#define AUDIO_INTERNAL_BITS 16
/*#define AUDIO_INTERNAL_BITS 32 */
/* Parameters for conversion filters */
typedef struct {
/* Pointer to source samples. */
const void *src;
/* Input format */
const audio_format2_t *srcfmt;
/* Pointer to destination buffer. */
void *dst;
/* Output format */
const audio_format2_t *dstfmt;
/*
* Number of frames to be converted.
* The conversion filter must output 'count' frames. src and dst
* are guaranteed that at least 'count' frames are contiguous.
* The caller does not reference this count after calling, so
* that the conversion filter can use passed this variable.
* For example, decrementing it directly.
*/
u_int count;
/* The conversion filters can use this pointer. */
void *context;
} audio_filter_arg_t;