~ubuntu-branches/ubuntu/oneiric/pulseaudio/oneiric

« back to all changes in this revision

Viewing changes to src/tests/resampler-test.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2007-12-04 00:56:08 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20071204005608-y1xqvcu45g1yxtlu
Tags: 0.9.8-1ubuntu1
"Hail our new PulseAudio overlords (part two)."

* Merge from Debian unstable.
* Ubuntu-specific changes:
  - debian/control:
    + Don't build-depend on libjack0.100.0-dev or build jack module
      packages,
    + Update pulseaudio's Recommends and Suggests to accomodate
      existing promoted main packages,
    + Explicitly mention pasuspender in pulseaudio-utils's long
      description,
    + Add Vcs-Bzr URI,
    + Adhere to DebianMaintainerField;
  - debian/rules: Use multiuser for update-rc.d;
  - debian/patches/series: Retain the exclusion of
    0001-Set-ESD-socket-to-tmp-.esd-socket-to-match-up-with.patch.
* Dropped Ubuntu-specific change (absorbed into Debian source):
  debian/patches/0002-Double-esound-maximum-sample-size.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: resampler-test.c 1971 2007-10-28 19:13:50Z lennart $ */
 
1
/* $Id: resampler-test.c 2044 2007-11-11 02:30:59Z lennart $ */
2
2
 
3
3
/***
4
4
  This file is part of PulseAudio.
71
71
            break;
72
72
        }
73
73
 
 
74
        case PA_SAMPLE_S32NE:
 
75
        case PA_SAMPLE_S32RE: {
 
76
            uint32_t *u = d;
 
77
 
 
78
            for (i = 0; i < chunk->length / pa_frame_size(ss); i++)
 
79
                printf("0x%08x ", *(u++));
 
80
 
 
81
            break;
 
82
        }
 
83
 
74
84
        case PA_SAMPLE_FLOAT32NE:
75
85
        case PA_SAMPLE_FLOAT32RE: {
76
86
            float *u = d;
137
147
            break;
138
148
        }
139
149
 
 
150
        case PA_SAMPLE_S32NE:
 
151
        case PA_SAMPLE_S32RE: {
 
152
            uint32_t *u = d;
 
153
 
 
154
            u[0] = 0x00000001;
 
155
            u[1] = 0xFFFF0002;
 
156
            u[2] = 0x7FFF0003;
 
157
            u[3] = 0x80000004;
 
158
            u[4] = 0x9fff0005;
 
159
            u[5] = 0x3fff0006;
 
160
            u[6] =    0x10007;
 
161
            u[7] = 0xF0000008;
 
162
            u[8] =   0x200009;
 
163
            u[9] =   0x21000A;
 
164
            break;
 
165
        }
 
166
 
140
167
        case PA_SAMPLE_FLOAT32NE:
141
168
        case PA_SAMPLE_FLOAT32RE: {
142
169
            float *u = d;
195
222
                   pa_sample_format_to_string(b.format),
196
223
                   pa_sample_format_to_string(a.format));
197
224
 
198
 
            pa_assert_se(forth = pa_resampler_new(pool, &a, NULL, &b, NULL, PA_RESAMPLER_AUTO, FALSE));
199
 
            pa_assert_se(back = pa_resampler_new(pool, &b, NULL, &a, NULL, PA_RESAMPLER_AUTO, FALSE));
 
225
            pa_assert_se(forth = pa_resampler_new(pool, &a, NULL, &b, NULL, PA_RESAMPLER_AUTO, 0));
 
226
            pa_assert_se(back = pa_resampler_new(pool, &b, NULL, &a, NULL, PA_RESAMPLER_AUTO, 0));
200
227
 
201
228
            i.memblock = generate_block(pool, &a);
202
229
            i.length = pa_memblock_get_length(i.memblock);