2 * Copyright (C) 2003-2010 The Music Player Daemon Project
3 * http://www.musicpd.org
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 * Library for working with packed 24 bit samples.
32 * Converts padded 24 bit samples (4 bytes per sample) to packed 24
33 * bit samples (3 bytes per sample).
35 * This function can be used to convert a buffer in-place.
37 * @param dest the destination buffer (array of triples)
38 * @param src the source buffer
39 * @param num_samples the number of samples to convert
40 * @param reverse_endian is src and dest in non-host byte order?
43 pcm_pack_24(uint8_t *dest
, const int32_t *src
, unsigned num_samples
,
47 * Converts packed 24 bit samples (3 bytes per sample) to padded 24
48 * bit samples (4 bytes per sample).
50 * @param dest the destination buffer
51 * @param src the source buffer (array of triples)
52 * @param num_samples the number of samples to convert
53 * @param reverse_endian is src and dest in non-host byte order?
56 pcm_unpack_24(int32_t *dest
, const uint8_t *src
, unsigned num_samples
,