Audio-LibSampleRate

 view release on metacpan or  search on metacpan

lib/Audio/LibSampleRate.pm  view on Meta::CPAN

with time for speeding up and slowing down effects.

SRC provides a small set of converters to allow quality to be traded
off against computation cost. The current best converter provides a
signal-to-noise ratio of 145dB with -3dB passband extending from DC to
96% of the theoretical best bandwidth for a given pair of input and
output sample rates.

There are two interfaces: a simple procedural interface which converts
a single block of samples in one go, and a more complex object
oriented interface which can handle streaming data, for situations
where the data is received in small pieces.

The underlying library also defines a callback interface, which is not
yet implemented in Audio::LibSampleRate.

All functions and methods below die in case of error with a message
containing the error number and description, as returned by SRC.

=head2 The simple interface

libsamplerate/ChangeLog  view on Meta::CPAN


    * configure.ac
    Added --enable-debug configuration flag.

    * tests/termination_test.c
    More modifications to catch corner cases.
    Added extra test to check for negative return values for input_frames_used
    and output_frames_gen fields of SRC_DATA.

    * src/src_zoh.c src/src_linear.c
    Fixed more bugs found using modified streaming_test.

    * src/samplerate.c
    Set input_frames and output_frames of SRC_DATA to zero if they are negative.
    Add check for overlapping SRC_DATA data_in and data_out arrays.

    * doc/api_full.html
    Document the fact that the SRC_DATA->data_in and data_out arrays may not
    overlap. Thanks to Paul Davis for pointing out this documentation oversight.

2002-12-24  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * tests/termination_test.c tests/streaming_test.c
    Merged these two test programs into termination_test.c.

    * tests/Makefile.am
    Modified for above change.

    * src/src_zoh.c src/src_linear.c
    Fixed bug found using modified streaming_test.

2002-12-21  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * src/samplerate.c src/src_*.c
    Changed the way multichannel accounting was done.

2002-12-20  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * tests/snr_bw_test.c
    Rearranged order of tests.

libsamplerate/ChangeLog  view on Meta::CPAN


    * doc/lists.html
    Added "subscribe" HREF.

2002-12-15  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * src/src_zoh.c src/src_linear.c
    Fixed a bug which was causing an incorrent number of output samples to be
    generated for a given conversion ratio and number of input samples.

    * tests/streaming_test.c tests/termination_test.c
    Modified pick up the above problem if it returns.

2002-12-14  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * tests/streaming_test.c
    Modified to mix long and short input buffers. This will help testing of
    smooth switching between standard sinc_process() and long_sinc_process().

2002-12-11  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * examples/audio_out.c
    More hacking to get this working on Win32.

    * tests/src-evaluate.c
    More work.

libsamplerate/Win32/Makefile.msvc  view on Meta::CPAN

# Test programs.

".\tests\misc_test.exe" : ".\tests\misc_test.c" ".\tests\util.obj"
    $(CPP) $(CFLAGS) /Fo".\tests\misc_test.obj" /c ".\tests\misc_test.c"
    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\misc_test.exe" ".\tests\misc_test.obj" ".\tests\util.obj" libsamplerate-0.lib

".\tests\termination_test.exe" : ".\tests\termination_test.c" ".\tests\util.obj"
    $(CPP) $(CFLAGS) /Fo".\tests\termination_test.obj" /c ".\tests\termination_test.c"
    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\termination_test.exe" ".\tests\termination_test.obj" ".\tests\util.obj" libsamplerate-0.lib

".\tests\streaming_test.exe" : ".\tests\streaming_test.c" ".\tests\util.obj"
    $(CPP) $(CFLAGS) /Fo".\tests\streaming_test.obj" /c ".\tests\streaming_test.c"
    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\streaming_test.exe" ".\tests\streaming_test.obj" ".\tests\util.obj" libsamplerate-0.lib

".\tests\simple_test.exe" : ".\tests\simple_test.c" ".\tests\util.obj"
    $(CPP) $(CFLAGS) /Fo".\tests\simple_test.obj" /c ".\tests\simple_test.c"
    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\simple_test.exe" ".\tests\simple_test.obj" ".\tests\util.obj" libsamplerate-0.lib

".\tests\reset_test.exe" : ".\tests\reset_test.c" ".\tests\util.obj"
    $(CPP) $(CFLAGS) /Fo".\tests\reset_test.obj" /c ".\tests\reset_test.c"
    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\reset_test.exe" ".\tests\reset_test.obj" ".\tests\util.obj" libsamplerate-0.lib

".\tests\multi_channel_test.exe" : ".\tests\multi_channel_test.c" ".\tests\util.obj" ".\tests\calc_snr.obj"

libsamplerate/doc/ChangeLog  view on Meta::CPAN


    * configure.ac
    Added --enable-debug configuration flag.

    * tests/termination_test.c
    More modifications to catch corner cases.
    Added extra test to check for negative return values for input_frames_used
    and output_frames_gen fields of SRC_DATA.

    * src/src_zoh.c src/src_linear.c
    Fixed more bugs found using modified streaming_test.

    * src/samplerate.c
    Set input_frames and output_frames of SRC_DATA to zero if they are negative.
    Add check for overlapping SRC_DATA data_in and data_out arrays.

    * doc/api_full.html
    Document the fact that the SRC_DATA->data_in and data_out arrays may not
    overlap. Thanks to Paul Davis for pointing out this documentation oversight.

2002-12-24  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * tests/termination_test.c tests/streaming_test.c
    Merged these two test programs into termination_test.c.

    * tests/Makefile.am
    Modified for above change.

    * src/src_zoh.c src/src_linear.c
    Fixed bug found using modified streaming_test.

2002-12-21  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * src/samplerate.c src/src_*.c
    Changed the way multichannel accounting was done.

2002-12-20  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * tests/snr_bw_test.c
    Rearranged order of tests.

libsamplerate/doc/ChangeLog  view on Meta::CPAN


    * doc/lists.html
    Added "subscribe" HREF.

2002-12-15  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * src/src_zoh.c src/src_linear.c
    Fixed a bug which was causing an incorrent number of output samples to be
    generated for a given conversion ratio and number of input samples.

    * tests/streaming_test.c tests/termination_test.c
    Modified pick up the above problem if it returns.

2002-12-14  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * tests/streaming_test.c
    Modified to mix long and short input buffers. This will help testing of
    smooth switching between standard sinc_process() and long_sinc_process().

2002-12-11  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>

    * examples/audio_out.c
    More hacking to get this working on Win32.

    * tests/src-evaluate.c
    More work.

libsamplerate/doc/api.html  view on Meta::CPAN

You will also need to link you binary with the libsamplerate library.
</P>
<P>
The API allows three methods for accessing the capabilies of the library:
</P>
<UL>
	<LI>A <A HREF="api_simple.html">simple interface</A> which can sample rate convert 
		a single block of samples (one or more channels) in one go.
		The simple API is less capable than the full API.
	<LI>A <A HREF="api_full.html">more fully featured interface</A> which allows time
		varying sample rate conversion on streaming data (again one or more
		channels).
	<LI>A <A HREF="api_callback.html">callback interface</A> which has the same 
		functionality as the interface above but allows the details of input and
		output to be separated.
		The output is generated by call a read function and the library calls a user
		supplied callback function to obtain its input.
		This interface is particularly well suited to applications where the output
		sample rate is varied with time.
</UL>

libsamplerate/doc/api_full.html  view on Meta::CPAN


<A NAME="Process"></A>
<H3><BR>Process</H3>
<PRE>
      int src_process (SRC_STATE *state, SRC_DATA *data) ;
</PRE>
<P>
The <B>src_process</B> function processes the data provided by the caller
in an <B>SRC_DATA</B> struct using the sample rate converter object specified
by the <B>SRC_STATE</B> pointer.
When operating on streaming data, this function can be called over and over again,
with each new call providing new input data and returning new output data.
</P>

<P>
The <B>SRC_DATA</B> struct passed as the second parameter to the <B>src_process</B> 
function has the following fields:
</P>
<PRE>
      typedef struct
      {   float  *data_in, *data_out ;



( run in 0.261 second using v1.01-cache-2.11-cpan-a5abf4f5562 )