projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix auto id 'that' blunder, tweak keyfrm popup speed undo
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
resample.h
diff --git
a/cinelerra-5.1/cinelerra/resample.h
b/cinelerra-5.1/cinelerra/resample.h
index b80bb6bd933304d59c79effad28fc250b7002c51..d58e1e52fe01156454e62c305284f091e8e08c85 100644
(file)
--- a/
cinelerra-5.1/cinelerra/resample.h
+++ b/
cinelerra-5.1/cinelerra/resample.h
@@
-29,7
+29,7
@@
#define BLACKSIZE 25
#include "resample.inc"
#define BLACKSIZE 25
#include "resample.inc"
-#include "samples.
inc
"
+#include "samples.
h
"
#include <stdint.h>
class Resample
#include <stdint.h>
class Resample
@@
-41,57
+41,43
@@
public:
// All positions are in file sample rate
// This must reverse the buffer during reverse playback
// so the filter always renders forward.
// All positions are in file sample rate
// This must reverse the buffer during reverse playback
// so the filter always renders forward.
- virtual int read_samples(Samples *buffer, int64_t start, int64_t len);
+ virtual int read_samples(Samples *buffer,
+ int64_t start, int64_t len, int direction);
// Resample from the file handler and store in *output.
// Returns 1 if the input reader failed.
// Resample from the file handler and store in *output.
// Returns 1 if the input reader failed.
- int resample(Samples *samples,
- int64_t out_len,
- int in_rate,
- int out_rate,
// Starting sample in output samplerate
// If reverse, the end of the buffer.
// Starting sample in output samplerate
// If reverse, the end of the buffer.
- int64_t out_position,
- int direction);
-
- int get_direction();
-
+ int resample(Samples *samples,
+ int64_t out_len, int in_rate, int out_rate,
+ int64_t out_position, int direction);
static void reverse_buffer(double *buffer, int64_t len);
// Reset after seeking
void reset();
private:
static void reverse_buffer(double *buffer, int64_t len);
// Reset after seeking
void reset();
private:
- double blackman(int i, double offset, double fcn, int l);
+ void blackman(double fcn, int l);
+ int set_input_position(int64_t in_pos, int in_dir);
// Query output temp
int get_output_size();
// void read_output(Samples *output, int size);
// Resamples input and dumps it to output_temp
// Query output temp
int get_output_size();
// void read_output(Samples *output, int size);
// Resamples input and dumps it to output_temp
- void resample_chunk(Samples *input,
- int64_t in_len,
- int in_rate,
- int out_rate);
- int read_chunk(Samples *input,
- int64_t len);
-
-// History buffer for resampling.
- double *old;
- double itime;
-
-
+ void resample_chunk(Samples *input, int64_t in_len,
+ int in_rate, int out_rate);
+ int direction;
// Unaligned resampled output
double *output_temp;
// Unaligned resampled output
double *output_temp;
-
-
// Total samples in unaligned output
int64_t output_size;
// Total samples in unaligned output
int64_t output_size;
-
- int direction;
// Allocation of unaligned output
int64_t output_allocation;
// Allocation of unaligned output
int64_t output_allocation;
+// History buffer for resampling.
+ Samples old;
// input chunk
Samples *input;
// input chunk
Samples *input;
+ double itime;
// Position of source in source sample rate.
int64_t input_position;
int64_t input_size;
// Position of source in source sample rate.
int64_t input_position;
int64_t input_size;