mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
interpolation: fix some warnings
git-svn-id: svn://localhost/ardour2/branches/3.0@5261 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
2641040701
commit
d45dfa5cb6
2 changed files with 7 additions and 4 deletions
|
|
@ -195,9 +195,12 @@ LibSamplerateInterpolation::add_channel_to (int input_buffer_size, int output_bu
|
|||
void
|
||||
LibSamplerateInterpolation::remove_channel_from ()
|
||||
{
|
||||
delete data.back ();
|
||||
SRC_DATA* d = data.back ();
|
||||
delete d;
|
||||
data.pop_back ();
|
||||
delete state.back ();
|
||||
if (state.back ()) {
|
||||
src_delete (state.back ());
|
||||
}
|
||||
state.pop_back ();
|
||||
reset_state ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ InterpolationTest::linearInterpolationTest ()
|
|||
for (int i = 0; i < NUM_SAMPLES - 1024;) {
|
||||
linear.set_speed (double(1.0)/double(3.0));
|
||||
linear.set_target_speed (double(1.0)/double(3.0));
|
||||
printf ("Interpolate: input: %d, output: %d, i: %d\n", input + i, output + i, i);
|
||||
//printf ("Interpolate: input: %d, output: %d, i: %d\n", input + i, output + i, i);
|
||||
result = linear.interpolate (0, 1024, input + i, output + i);
|
||||
printf ("Result: %d\n", result);
|
||||
//CPPUNIT_ASSERT_EQUAL ((uint32_t)((NUM_SAMPLES - 100) * interpolation.speed()), result);
|
||||
|
|
@ -115,7 +115,7 @@ InterpolationTest::libSamplerateInterpolationTest ()
|
|||
cout << "\nSpeed: 0.5";
|
||||
for (int i = 0; i < NUM_SAMPLES;) {
|
||||
interpolation.set_speed (0.5);
|
||||
printf ("Interpolate: input: %d, output: %d, i: %d\n", input + i, output + i, i);
|
||||
//printf ("Interpolate: input: %d, output: %d, i: %d\n", input + i, output + i, i);
|
||||
result = interpolation.interpolate (0, NUM_SAMPLES - 100, input + i, output + i);
|
||||
printf ("Result: %d\n", result);
|
||||
//CPPUNIT_ASSERT_EQUAL ((uint32_t)((NUM_SAMPLES - 100) * interpolation.speed()), result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue