diff --git a/src/Clip.cpp b/src/Clip.cpp
index 31c0fc6e..9564e10c 100644
--- a/src/Clip.cpp
+++ b/src/Clip.cpp
@@ -396,7 +396,7 @@ tr1::shared_ptr Clip::get_time_mapped_frame(tr1::shared_ptr frame,
}
// Resample audio to be X times faster (where X is the delta of the repeat fraction)
- resampler->SetBuffer(samples, float(number_of_samples) / float(start));
+ resampler->SetBuffer(samples, float(start) / float(number_of_samples));
// Resample data, and return new buffer pointer
AudioSampleBuffer *buffer = resampler->GetResampledBuffer();
diff --git a/src/Main.cpp b/src/Main.cpp
index 3953b1e8..b0cec8a0 100644
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -38,7 +38,7 @@ int main()
Timeline t(640, 360, Framerate(24,1));
// Add some clips
- Clip c1(new FFmpegReader("/home/jonathan/Videos/sintel-1024-stereo.mp4"));
+ Clip c1(new FFmpegReader("/home/jonathan/Videos/sintel_trailer-720p.mp4"));
c1.Position(0.0);
// LINEAR Reverse
@@ -46,24 +46,28 @@ int main()
//c1.time.AddPoint(500, 1, LINEAR);
// LINEAR Slow Reverse (sounds wavy, due to periodic repeated frames)
- //c1.time.AddPoint(1, 500, LINEAR);
- //c1.time.AddPoint(500, 100, LINEAR);
+ c1.time.AddPoint(1, 500, LINEAR);
+ c1.time.AddPoint(500, 100, LINEAR);
// LINEAR Fast Reverse (sounds wavy, due to periodic repeated frames)
//c1.time.AddPoint(1, 600, LINEAR);
//c1.time.AddPoint(500, 1, LINEAR);
- // BEZIER Reverse
- openshot::Point p1(1,500);
- p1.handle_left = Coordinate(1,500);
- p1.handle_right = Coordinate(250,500);
+ // LINEAR Slow Forward
+ //c1.time.AddPoint(1, 1000, LINEAR);
+ //c1.time.AddPoint(500, 1, LINEAR);
- openshot::Point p2(500,100);
- p1.handle_left = Coordinate(500,350);
- p1.handle_right = Coordinate(500,100);
-
- c1.time.AddPoint(p1);
- c1.time.AddPoint(p2);
+// // BEZIER Reverse
+// openshot::Point p1(1,500);
+// p1.handle_left = Coordinate(1,500);
+// p1.handle_right = Coordinate(250,500);
+//
+// openshot::Point p2(500,100);
+// p1.handle_left = Coordinate(500,350);
+// p1.handle_right = Coordinate(500,100);
+//
+// c1.time.AddPoint(p1);
+// c1.time.AddPoint(p2);
// c1.time.AddPoint(1, 500, LINEAR);
// c1.time.AddPoint(500, 1, LINEAR);