00001 /* MuSE - Multiple Streaming Engine 00002 * Copyright (C) 2000-2002 Denis Roio aka jaromil <jaromil@dyne.org> 00003 * 00004 * This source code is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Public License as published 00006 * by the Free Software Foundation; either version 2 of the License, 00007 * or (at your option) any later version. 00008 * 00009 * This source code is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 * Please refer to the GNU Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Public License along with 00015 * this source code; if not, write to: 00016 * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00018 00019 #ifndef __AUDIOPROC_H 00020 #define __AUDIOPROC_H 00021 00022 #include "generic.h" 00023 00024 /* stream mixers */ 00025 00026 /* TERMINOLOGY 00027 samples are 32bit if stereo, 16bit if mono (assuming 16bit sound) 00028 frames = samples * channels; 00029 bytes = frames * ( sizeof( typeof( frames ) ) ); 00030 */ 00031 00032 /* 00033 int mixxx_mono_11(int *dest, short *chan, unsigned int num, float volume); 00034 int mixxx_stereo_11(int *dest, short *chan, unsigned int num, float volume); 00035 int mixxx_mono_16(int *dest, short *chan, unsigned int num, float volume); 00036 int mixxx_stereo_16(int *dest, short *chan, unsigned int num, float volume); 00037 */ 00038 #ifdef MOP_RESAMP 00039 int resample_mono_16(IN_DATATYPE *dest, IN_DATATYPE *src, IN_DATATYPE *prev, 00040 unsigned int num, float volume); 00041 int resample_stereo_16(IN_DATATYPE *dest, IN_DATATYPE *src, IN_DATATYPE *prev, 00042 unsigned int num, float volume); 00043 #endif 00044 int resample_mono_22(IN_DATATYPE *dest, IN_DATATYPE *src, IN_DATATYPE *prev, 00045 unsigned int num, float volume); 00046 00047 int resample_stereo_22(IN_DATATYPE *dest, IN_DATATYPE *src, IN_DATATYPE *prev, 00048 unsigned int num, float volume); 00049 00050 #ifdef MOP_RESAMP 00051 int resample_mono_32(IN_DATATYPE *dest, IN_DATATYPE *src, IN_DATATYPE *prev, 00052 unsigned int num, float volume); 00053 int resample_stereo_32(IN_DATATYPE *dest, IN_DATATYPE *src, IN_DATATYPE *prev, 00054 unsigned int num, float volume); 00055 #endif 00056 /* 00057 int mixxx_mono_32(int *dest, IN_DATATYPE *chan, IN_DATATYPE *prev, 00058 unsigned int num, float volume); 00059 int mixxx_stereo_32(int *dest, IN_DATATYPE *chan, IN_DATATYPE *prev, 00060 unsigned int num, float volume); 00061 */ 00062 00063 int resample_mono_44(IN_DATATYPE *dest, IN_DATATYPE *src, IN_DATATYPE *prev, 00064 unsigned int num, float volume); 00065 00066 int resample_stereo_44(IN_DATATYPE *dest, IN_DATATYPE *src, IN_DATATYPE *prev, 00067 unsigned int num, float volume); 00068 00069 /* souncard in mixer */ 00070 int mixxx_stereo_44_novol(int *dest, short *chan, int num); 00071 00072 //int resample(short *in, long int lenght, short *out, int speed); 00073 00074 #endif