[xiph-commits] r3335 -
libfishsound/branches/1.0-stable-flac/src/tests
conrad at svn.annodex.net
conrad at svn.annodex.net
Fri Jan 11 05:09:36 PST 2008
Author: conrad
Date: 2008-01-11 05:09:35 -0800 (Fri, 11 Jan 2008)
New Revision: 3335
Modified:
libfishsound/branches/1.0-stable-flac/src/tests/encdec-audio.c
Log:
correct formatting in encdec-audio.c, fixes bug where --disable-speex also
disabled testing of flac
Modified: libfishsound/branches/1.0-stable-flac/src/tests/encdec-audio.c
===================================================================
--- libfishsound/branches/1.0-stable-flac/src/tests/encdec-audio.c 2008-01-11 12:37:24 UTC (rev 3334)
+++ libfishsound/branches/1.0-stable-flac/src/tests/encdec-audio.c 2008-01-11 13:09:35 UTC (rev 3335)
@@ -98,7 +98,7 @@
static int
decoded_float_ilv (FishSound * fsound, float * pcm[], long frames,
- void * user_data)
+ void * user_data)
{
FS_EncDec * ed = (FS_EncDec *) user_data;
@@ -133,7 +133,7 @@
static FS_EncDec *
fs_encdec_new (int samplerate, int channels, int format, int interleave,
- int blocksize)
+ int blocksize)
{
FS_EncDec * ed;
FishSoundInfo fsinfo;
@@ -200,7 +200,7 @@
static int
fs_encdec_test (int samplerate, int channels, int format, int interleave,
- int blocksize)
+ int blocksize)
{
FS_EncDec * ed;
char msg[128];
@@ -208,11 +208,11 @@
long expected_frames;
snprintf (msg, 128,
- "+ %2d channel %6d Hz %s, %d frame buffer (%s)",
- channels, samplerate,
+ "+ %2d channel %6d Hz %s, %d frame buffer (%s)",
+ channels, samplerate,
format == FISH_SOUND_VORBIS ? "Vorbis," : (format == FISH_SOUND_FLAC ? "Flac," : "Speex, "),
- blocksize,
- interleave ? "interleave" : "non-interleave");
+ blocksize,
+ interleave ? "interleave" : "non-interleave");
INFO (msg);
ed = fs_encdec_new (samplerate, channels, format, interleave, blocksize);
@@ -220,7 +220,7 @@
for (i = 0; i < iter; i++) {
ed->actual_frames_in += blocksize;
fish_sound_prepare_truncation (ed->encoder, ed->actual_frames_in,
- (i == (iter - 1)));
+ (i == (iter - 1)));
fish_sound_encode (ed->encoder, ed->pcm, blocksize);
ed->reported_frames_in = fish_sound_get_frameno (ed->encoder);
}
@@ -235,8 +235,8 @@
if (ed->actual_frames_out != expected_frames) {
snprintf (msg, 128,
- "%ld frames encoded, %ld frames decoded",
- ed->actual_frames_in, ed->actual_frames_out);
+ "%ld frames encoded, %ld frames decoded",
+ ed->actual_frames_in, ed->actual_frames_out);
if (ed->actual_frames_out < ed->actual_frames_in) {
FAIL (msg);
} else {
@@ -251,8 +251,8 @@
if (ed->reported_frames_out != expected_frames) {
snprintf (msg, 128,
- "%ld frames reported in, %ld frames reported out",
- ed->reported_frames_in, ed->reported_frames_out);
+ "%ld frames reported in, %ld frames reported out",
+ ed->reported_frames_in, ed->reported_frames_out);
WARN (msg);
}
@@ -318,59 +318,56 @@
for (s = 0; test_samplerates[s]; s++) {
for (c = 0; test_channels[c]; c++) {
- if (test_non_interleave) {
- /* Test VORBIS */
- if (test_vorbis) {
- fs_encdec_test (test_samplerates[s], test_channels[c],
- FISH_SOUND_VORBIS, 0, test_blocksizes[b]);
- }
-
- /* Test SPEEX */
- if (test_speex) {
- if (test_channels[c] <= 2) {
- fs_encdec_test (test_samplerates[s], test_channels[c],
- FISH_SOUND_SPEEX, 0, test_blocksizes[b]);
-
- }
+ if (test_non_interleave) {
+ /* Test VORBIS */
+ if (test_vorbis) {
+ fs_encdec_test (test_samplerates[s], test_channels[c],
+ FISH_SOUND_VORBIS, 0, test_blocksizes[b]);
+ }
+
+ /* Test SPEEX */
+ if (test_speex) {
+ if (test_channels[c] <= 2) {
+ fs_encdec_test (test_samplerates[s], test_channels[c],
+ FISH_SOUND_SPEEX, 0, test_blocksizes[b]);
+ }
+ }
- /* Test FLAC */
- if (test_flac) {
- if (test_channels[c] <= 8) {
- fs_encdec_test (test_samplerates[s], test_channels[c],
- FISH_SOUND_FLAC, 0, test_blocksizes[b]);
-
- }
- }
- }
- }
+ /* Test FLAC */
+ if (test_flac) {
+ if (test_channels[c] <= 8) {
+ fs_encdec_test (test_samplerates[s], test_channels[c],
+ FISH_SOUND_FLAC, 0, test_blocksizes[b]);
+
+ }
+ }
+ }
- if (test_interleave) {
- /* Test VORBIS */
- if (test_vorbis) {
- fs_encdec_test (test_samplerates[s], test_channels[c],
- FISH_SOUND_VORBIS, 1, test_blocksizes[b]);
- }
-
- /* Test SPEEX */
- if (test_speex) {
- if (test_channels[c] <= 2) {
- fs_encdec_test (test_samplerates[s], test_channels[c],
- FISH_SOUND_SPEEX, 1, test_blocksizes[b]);
-
- }
+ if (test_interleave) {
+ /* Test VORBIS */
+ if (test_vorbis) {
+ fs_encdec_test (test_samplerates[s], test_channels[c],
+ FISH_SOUND_VORBIS, 1, test_blocksizes[b]);
+ }
+
+ /* Test SPEEX */
+ if (test_speex) {
+ if (test_channels[c] <= 2) {
+ fs_encdec_test (test_samplerates[s], test_channels[c],
+ FISH_SOUND_SPEEX, 1, test_blocksizes[b]);
+ }
+ }
- /* Test FLAC */
- if (test_flac) {
- if (test_channels[c] <= 8) {
- fs_encdec_test (test_samplerates[s], test_channels[c],
- FISH_SOUND_FLAC, 1, test_blocksizes[b]);
-
- }
- }
- }
- }
+ /* Test FLAC */
+ if (test_flac) {
+ if (test_channels[c] <= 8) {
+ fs_encdec_test (test_samplerates[s], test_channels[c],
+ FISH_SOUND_FLAC, 1, test_blocksizes[b]);
+
+ }
+ }
+ }
-
}
}
}
More information about the commits
mailing list