]>
iEval git - fdkaac.git/blob - src/lpcm.h
2 * Copyright (C) 2013 nu774
3 * For conditions of distribution and use, see copyright notice in COPYING
13 PCM_TYPE_SINT_BE
= (8|1),
14 PCM_TYPE_UINT_BE
= (8|2),
15 PCM_TYPE_FLOAT_BE
= (8|4),
18 typedef struct pcm_sample_description_t
{
19 enum pcm_type sample_type
;
21 uint8_t bits_per_channel
;
22 uint8_t bytes_per_frame
;
23 uint8_t channels_per_frame
;
24 uint32_t channel_mask
;
25 } pcm_sample_description_t
;
27 #define PCM_IS_SINT(desc) ((desc)->sample_type & 1)
28 #define PCM_IS_UINT(desc) ((desc)->sample_type & 2)
29 #define PCM_IS_FLOAT(desc) ((desc)->sample_type & 4)
30 #define PCM_IS_BIG_ENDIAN(desc) ((desc)->sample_type & 8)
31 #define PCM_BYTES_PER_CHANNEL(desc) \
32 ((desc)->bytes_per_frame / (desc)->channels_per_frame)
34 int pcm_convert_to_native_sint16(const pcm_sample_description_t
*format
,
35 const void *input
, uint32_t nframes
,
36 int16_t **result
, uint32_t *osize
);
This page took 0.043033 seconds and 4 git commands to generate.