XMMS2
xmms_sample.h
Go to the documentation of this file.
1 /* XMMS2 - X Music Multiplexer System
2  * Copyright (C) 2003-2011 XMMS2 Team
3  *
4  * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  */
16 
17 #ifndef __XMMS_PRIV_SAMPLE_H__
18 #define __XMMS_PRIV_SAMPLE_H__
19 
21 #include "xmms/xmms_sample.h"
22 #include "xmms/xmms_medialib.h"
23 
25 
28 guint xmms_sample_ms_to_samples (const xmms_stream_type_t *st, guint ms);
29 guint xmms_sample_samples_to_ms (const xmms_stream_type_t *st, guint samples);
30 
31 gint64 xmms_sample_convert_scale (xmms_sample_converter_t *conv, gint64 samples);
32 gint64 xmms_sample_convert_rev_scale (xmms_sample_converter_t *conv, gint64 samples);
33 
34 
35 /* internal? */
36 void xmms_sample_convert (xmms_sample_converter_t *conv, xmms_sample_t *in, guint len, xmms_sample_t **out, guint *outlen);
42 
43 #endif
G_BEGIN_DECLS typedef gint32 xmms_medialib_entry_t
Definition: xmms_medialib.h:86
guint xmms_sample_ms_to_samples(const xmms_stream_type_t *st, guint ms)
convert from milliseconds to samples for this format.
Definition: sample.head.c:177
struct xmms_stream_type_St xmms_stream_type_t
xmms_sample_converter_t * xmms_sample_converter_init(xmms_stream_type_t *from, xmms_stream_type_t *to)
Definition: sample.head.c:77
struct xmms_sample_converter_St xmms_sample_converter_t
Definition: xmms_sample.h:38
void xmms_sample_t
Definition: xmms_sample.h:58
xmms_sample_converter_t * xmms_sample_audioformats_coerce(xmms_stream_type_t *in, const GList *goal_types)
guint xmms_sample_samples_to_ms(const xmms_stream_type_t *st, guint samples)
Convert from samples to milliseconds for this format.
Definition: sample.head.c:188
guint(* xmms_sample_conv_func_t)(xmms_sample_converter_t *, xmms_sample_t *, guint, xmms_sample_t *)
Definition: xmms_sample.h:24
xmms_stream_type_t * xmms_sample_converter_get_from(xmms_sample_converter_t *conv)
Return the audio format used by the converter as source.
Definition: sample.head.c:121
gint64 xmms_sample_convert_scale(xmms_sample_converter_t *conv, gint64 samples)
Definition: sample.head.c:297
void xmms_sample_convert(xmms_sample_converter_t *conv, xmms_sample_t *in, guint len, xmms_sample_t **out, guint *outlen)
do the actual converstion between two audio formats.
Definition: sample.head.c:256
gint xmms_sample_frame_size_get(const xmms_stream_type_t *st)
Definition: sample.head.c:206
xmms_stream_type_t * xmms_sample_converter_get_to(xmms_sample_converter_t *conv)
Return the audio format used by the converter as target.
Definition: sample.head.c:132
void xmms_sample_converter_to_medialib(xmms_sample_converter_t *conv, xmms_medialib_entry_t entry)
Definition: sample.head.c:142
gint64 xmms_sample_convert_rev_scale(xmms_sample_converter_t *conv, gint64 samples)
Definition: sample.head.c:309
void xmms_sample_convert_reset(xmms_sample_converter_t *conv)
Definition: sample.head.c:317