Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/samplerate.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ SRC_STATE* src_clone (SRC_STATE* orig, int *error) ;
SRC_STATE* src_callback_new (src_callback_t func, int converter_type, int channels,
int *error, void* cb_data) ;


/**
* Double-precision getters: Fractional used-frame
* tracking while using the callback API.
*/
double src_get_last_position(SRC_STATE* state);
double src_get_saved_frames(SRC_STATE* state);

/*
** Cleanup all internal allocations.
** Always returns NULL.
Expand Down
9 changes: 9 additions & 0 deletions src/samplerate.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ src_callback_new (src_callback_t func, int converter_type, int channels, int *er
return state ;
} /* src_callback_new */


double src_get_last_postion(SRC_STATE* state) {
return state->last_position;
}

double src_get_saved_frames(SRC_STATE* state) {
return state->saved_frames;
}

SRC_STATE *
src_delete (SRC_STATE *state)
{
Expand Down