ref: 91e703b66863c7a09c1aa39ea0ed42a437bb3f65
parent: 19b5adc11368778fa29e7c10b1fb752decf1222c
author: Erik de Castro Lopo <[email protected]>
date: Sun Jan 10 05:15:52 EST 2010
Revert change that moved the src_ratio field to the start of SRC_DATA struct. This change does have some merit, but is not worth it considering that its an API change. This idea will be reconsidered when the API does change.
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,12 @@
due to clipping of the output when the format is FLAC. This problem arises
due to libsndfile's in ability to seek in a FLAC file during write.
+ * src/samplerate.h tests/termination_test.c
+ Revert change that moved the src_ratio field to the start of SRC_DATA
+ struct. This change does have some merit, but is not worth it considering
+ that its an API change. This idea will be reconsidered when the API does
+ change.
+
2009-12-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* doc/win32.html
--- a/src/samplerate.h
+++ b/src/samplerate.h
@@ -1,5 +1,5 @@
/*
-** Copyright (C) 2002-2009 Erik de Castro Lopo <[email protected]>
+** Copyright (C) 2002-2010 Erik de Castro Lopo <[email protected]>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -36,19 +36,18 @@
/* Opaque data type SRC_STATE. */
-struct SRC_STATE_tag ;
typedef struct SRC_STATE_tag SRC_STATE ;
/* SRC_DATA is used to pass data to src_simple() and src_process(). */
typedef struct
-{ double src_ratio ;
+{ float *data_in, *data_out ;
- float *data_in, *data_out ;
-
long input_frames, output_frames ;
long input_frames_used, output_frames_gen ;
int end_of_input ;
+
+ double src_ratio ;
} SRC_DATA ;
/* SRC_CB_DATA is used with callback based API. */
--- a/tests/termination_test.c
+++ b/tests/termination_test.c
@@ -1,5 +1,5 @@
/*
-** Copyright (C) 2002-2009 Erik de Castro Lopo <[email protected]>
+** Copyright (C) 2002-2010 Erik de Castro Lopo <[email protected]>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -83,10 +83,10 @@
float out [olen] ;
double ratio = (1.0 * olen) / ilen ;
SRC_DATA src_data =
- { ratio,
- in, out,
+ { in, out,
ilen, olen,
- 0, 0, 0
+ 0, 0, 0,
+ ratio
} ;
error = src_simple (&src_data, converter, 1) ;