History

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.

Erik de Castro Lopo committed 16 years ago

Commit 91e703b1 parent 19b5adc3 files · +14 −9Browse files

Unified · Split

3 files
  1. ChangeLog +6 −0
  2. src/samplerate.h +4 −5
  3. tests/termination_test.c +4 −4
ChangeLog+6−0
@@ -5,6 +5,12 @@ · 4 unmodified lines
5 due to clipping of the output when the format is FLAC. This problem arises5 due to clipping of the output when the format is FLAC. This problem arises
6 due to libsndfile's in ability to seek in a FLAC file during write.6 due to libsndfile's in ability to seek in a FLAC file during write.
7 7
8 * src/samplerate.h tests/termination_test.c
9 Revert change that moved the src_ratio field to the start of SRC_DATA
10 struct. This change does have some merit, but is not worth it considering
11 that its an API change. This idea will be reconsidered when the API does
12 change.
13
82009-12-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>142009-12-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
9 15
10 * doc/win32.html16 * doc/win32.html
src/samplerate.h+4−5
@@ -1,5 +1,5 @@
1/*1/*
2** Copyright (C) 2002-2009 Erik de Castro Lopo <erikd@mega-nerd.com>2** Copyright (C) 2002-2010 Erik de Castro Lopo <erikd@mega-nerd.com>
3**3**
4** This program is free software; you can redistribute it and/or modify4** This program is free software; you can redistribute it and/or modify
5** it under the terms of the GNU General Public License as published by5** it under the terms of the GNU General Public License as published by
@@ -36,19 +36,18 @@ extern "C" { · 30 unmodified lines
36 36
37 37
38/* Opaque data type SRC_STATE. */38/* Opaque data type SRC_STATE. */
39struct SRC_STATE_tag ;
40typedef struct SRC_STATE_tag SRC_STATE ;39typedef struct SRC_STATE_tag SRC_STATE ;
41 40
42/* SRC_DATA is used to pass data to src_simple() and src_process(). */41/* SRC_DATA is used to pass data to src_simple() and src_process(). */
43typedef struct42typedef struct
44{ double src_ratio ;43{ float *data_in, *data_out ;
45
46 float *data_in, *data_out ;
47 44
48 long input_frames, output_frames ;45 long input_frames, output_frames ;
49 long input_frames_used, output_frames_gen ;46 long input_frames_used, output_frames_gen ;
50 47
51 int end_of_input ;48 int end_of_input ;
49
50 double src_ratio ;
52} SRC_DATA ;51} SRC_DATA ;
53 52
54/* SRC_CB_DATA is used with callback based API. */53/* SRC_CB_DATA is used with callback based API. */
tests/termination_test.c+4−4
@@ -1,5 +1,5 @@
1/*1/*
2** Copyright (C) 2002-2009 Erik de Castro Lopo <erikd@mega-nerd.com>2** Copyright (C) 2002-2010 Erik de Castro Lopo <erikd@mega-nerd.com>
3**3**
4** This program is free software; you can redistribute it and/or modify4** This program is free software; you can redistribute it and/or modify
5** it under the terms of the GNU General Public License as published by5** it under the terms of the GNU General Public License as published by
@@ -83,10 +83,10 @@ simple_test (int converter) · 77 unmodified lines
83 float out [olen] ;83 float out [olen] ;
84 double ratio = (1.0 * olen) / ilen ;84 double ratio = (1.0 * olen) / ilen ;
85 SRC_DATA src_data =85 SRC_DATA src_data =
86 { ratio,86 { in, out,
87 in, out,
88 ilen, olen,87 ilen, olen,
89 0, 0, 088 0, 0, 0,
89 ratio
90 } ;90 } ;
91 91
92 error = src_simple (&src_data, converter, 1) ;92 error = src_simple (&src_data, converter, 1) ;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t