add support for 32bit integer samples

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2037 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-11-09 02:45:07 +00:00
parent 3c17c7d442
commit 7e0f547f2f
12 changed files with 319 additions and 17 deletions

View file

@ -71,6 +71,16 @@ static void dump_block(const pa_sample_spec *ss, const pa_memchunk *chunk) {
break;
}
case PA_SAMPLE_S32NE:
case PA_SAMPLE_S32RE: {
uint32_t *u = d;
for (i = 0; i < chunk->length / pa_frame_size(ss); i++)
printf("0x%08x ", *(u++));
break;
}
case PA_SAMPLE_FLOAT32NE:
case PA_SAMPLE_FLOAT32RE: {
float *u = d;
@ -137,6 +147,23 @@ static pa_memblock* generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
break;
}
case PA_SAMPLE_S32NE:
case PA_SAMPLE_S32RE: {
uint32_t *u = d;
u[0] = 0x00000001;
u[1] = 0xFFFF0002;
u[2] = 0x7FFF0003;
u[3] = 0x80000004;
u[4] = 0x9fff0005;
u[5] = 0x3fff0006;
u[6] = 0x10007;
u[7] = 0xF0000008;
u[8] = 0x200009;
u[9] = 0x21000A;
break;
}
case PA_SAMPLE_FLOAT32NE:
case PA_SAMPLE_FLOAT32RE: {
float *u = d;