XMMS2
|
00001 /* XMMS2 - X Music Multiplexer System 00002 * Copyright (C) 2003-2011 XMMS2 Team 00003 * 00004 * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!! 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 */ 00016 00017 #ifndef __XMMS_PRIV_SAMPLE_H__ 00018 #define __XMMS_PRIV_SAMPLE_H__ 00019 00020 #include "xmmspriv/xmms_streamtype.h" 00021 #include "xmms/xmms_sample.h" 00022 #include "xmms/xmms_medialib.h" 00023 00024 typedef guint (*xmms_sample_conv_func_t) (xmms_sample_converter_t *, xmms_sample_t *, guint , xmms_sample_t *); 00025 00026 xmms_sample_converter_t *xmms_sample_converter_init (xmms_stream_type_t *from, xmms_stream_type_t *to); 00027 gint xmms_sample_frame_size_get (const xmms_stream_type_t *st); 00028 guint xmms_sample_ms_to_samples (const xmms_stream_type_t *st, guint ms); 00029 guint xmms_sample_samples_to_ms (const xmms_stream_type_t *st, guint samples); 00030 00031 gint64 xmms_sample_convert_scale (xmms_sample_converter_t *conv, gint64 samples); 00032 gint64 xmms_sample_convert_rev_scale (xmms_sample_converter_t *conv, gint64 samples); 00033 00034 00035 /* internal? */ 00036 void xmms_sample_convert (xmms_sample_converter_t *conv, xmms_sample_t *in, guint len, xmms_sample_t **out, guint *outlen); 00037 void xmms_sample_convert_reset (xmms_sample_converter_t *conv); 00038 xmms_sample_converter_t *xmms_sample_audioformats_coerce (xmms_stream_type_t *in, const GList *goal_types); 00039 xmms_stream_type_t *xmms_sample_converter_get_from (xmms_sample_converter_t *conv); 00040 xmms_stream_type_t *xmms_sample_converter_get_to (xmms_sample_converter_t *conv); 00041 void xmms_sample_converter_to_medialib (xmms_sample_converter_t *conv, xmms_medialib_entry_t entry); 00042 00043 #endif