MPD

src/pcm_resample_internal.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003-2010 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 void
00036 pcm_resample_lsr_deinit(struct pcm_resample_state *state);
00037 
00038 const int16_t *
00039 pcm_resample_lsr_16(struct pcm_resample_state *state,
00040                     uint8_t channels,
00041                     unsigned src_rate,
00042                     const int16_t *src_buffer, size_t src_size,
00043                     unsigned dest_rate, size_t *dest_size_r,
00044                     GError **error_r);
00045 
00046 const int32_t *
00047 pcm_resample_lsr_32(struct pcm_resample_state *state,
00048                     uint8_t channels,
00049                     unsigned src_rate,
00050                     const int32_t *src_buffer,
00051                     G_GNUC_UNUSED size_t src_size,
00052                     unsigned dest_rate, size_t *dest_size_r,
00053                     GError **error_r);
00054 
00055 #endif
00056 
00057 void
00058 pcm_resample_fallback_deinit(struct pcm_resample_state *state);
00059 
00060 const int16_t *
00061 pcm_resample_fallback_16(struct pcm_resample_state *state,
00062                          uint8_t channels,
00063                          unsigned src_rate,
00064                          const int16_t *src_buffer, size_t src_size,
00065                          unsigned dest_rate,
00066                          size_t *dest_size_r);
00067 
00068 const int32_t *
00069 pcm_resample_fallback_32(struct pcm_resample_state *state,
00070                          uint8_t channels,
00071                          unsigned src_rate,
00072                          const int32_t *src_buffer,
00073                          G_GNUC_UNUSED size_t src_size,
00074                          unsigned dest_rate,
00075                          size_t *dest_size_r);
00076 
00077 #endif