MPD 0.17~git
|
00001 /* 00002 * Copyright (C) 2003-2011 The Music Player Daemon Project 00003 * http://www.musicpd.org 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 00027 #ifndef MPD_PCM_RESAMPLE_INTERNAL_H 00028 #define MPD_PCM_RESAMPLE_INTERNAL_H 00029 00030 #include "check.h" 00031 #include "pcm_resample.h" 00032 00033 #ifdef HAVE_LIBSAMPLERATE 00034 00035 bool 00036 pcm_resample_lsr_global_init(const char *converter, GError **error_r); 00037 00038 void 00039 pcm_resample_lsr_init(struct pcm_resample_state *state); 00040 00041 void 00042 pcm_resample_lsr_deinit(struct pcm_resample_state *state); 00043 00044 const float * 00045 pcm_resample_lsr_float(struct pcm_resample_state *state, 00046 unsigned channels, 00047 unsigned src_rate, 00048 const float *src_buffer, size_t src_size, 00049 unsigned dest_rate, size_t *dest_size_r, 00050 GError **error_r); 00051 00052 const int16_t * 00053 pcm_resample_lsr_16(struct pcm_resample_state *state, 00054 unsigned channels, 00055 unsigned src_rate, 00056 const int16_t *src_buffer, size_t src_size, 00057 unsigned dest_rate, size_t *dest_size_r, 00058 GError **error_r); 00059 00060 const int32_t * 00061 pcm_resample_lsr_32(struct pcm_resample_state *state, 00062 unsigned channels, 00063 unsigned src_rate, 00064 const int32_t *src_buffer, 00065 G_GNUC_UNUSED size_t src_size, 00066 unsigned dest_rate, size_t *dest_size_r, 00067 GError **error_r); 00068 00069 #endif 00070 00071 void 00072 pcm_resample_fallback_init(struct pcm_resample_state *state); 00073 00074 void 00075 pcm_resample_fallback_deinit(struct pcm_resample_state *state); 00076 00077 const int16_t * 00078 pcm_resample_fallback_16(struct pcm_resample_state *state, 00079 unsigned channels, 00080 unsigned src_rate, 00081 const int16_t *src_buffer, size_t src_size, 00082 unsigned dest_rate, 00083 size_t *dest_size_r); 00084 00085 const int32_t * 00086 pcm_resample_fallback_32(struct pcm_resample_state *state, 00087 unsigned channels, 00088 unsigned src_rate, 00089 const int32_t *src_buffer, 00090 G_GNUC_UNUSED size_t src_size, 00091 unsigned dest_rate, 00092 size_t *dest_size_r); 00093 00094 #endif