1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-16 01:21:25 +01:00

Update libsndfile to 1.0.29pre2+git

This pulls in MANY (over 890) changes compared to our
from our current 1.0.24 version.
This commit is contained in:
Leland Lucius
2020-03-16 22:41:09 -05:00
parent 4ac45bb5f8
commit b749a16943
370 changed files with 39029 additions and 81333 deletions

View File

@@ -49,6 +49,10 @@
<TD><A HREF="#SFC_GET_LOG_INFO">SFC_GET_LOG_INFO</A></TD>
<TD>Retrieve the internal per-file operation log.</TD>
</TR>
<TR>
<TD><A HREF="#SFC_GET_CURRENT_SF_INFO">SFC_GET_CURRENT_SF_INFO</A></TD>
<TD>Retrieve <CODE>SF_INFO</CODE> struct of opened file.</TD>
</TR>
<TR>
<TD><A HREF="#SFC_CALC_SIGNAL_MAX">SFC_CALC_SIGNAL_MAX</A></TD>
<TD>Calculate the measured maximum signal value.</TD>
@@ -177,22 +181,27 @@
</TR>
<TR>
<TD><A HREF="#SFC_WAVEX_GET_AMBISONIC">SFC_GET_AMBISONIC</A></TD>
<TD><A HREF="#SFC_WAVEX_GET_AMBISONIC">SFC_WAVEX_GET_AMBISONIC</A></TD>
<TD>Test a WAVEX file for Ambisonic format</TD>
</TR>
<TR>
<TD><A HREF="#SFC_WAVEX_SET_AMBISONIC">SFC_SET_AMBISONIC</A></TD>
<TD><A HREF="#SFC_WAVEX_SET_AMBISONIC">SFC_WAVEX_SET_AMBISONIC</A></TD>
<TD>Modify a WAVEX header for Ambisonic format</TD>
</TR>
<TR>
<TD><A HREF="#SFC_SET_VBR_ENCODING_QUALITY">SFC_SET_VBR_ENCODING_QUALITY</A></TD>
<TD>Set the the Variable Bit Rate encoding quality</TD>
<TD>Set the Variable Bit Rate encoding quality</TD>
</TR>
<TR>
<TD><A HREF="#SFC_RAW_NEEDS_ENDSWAP">SFC_RAW_NEEDS_ENDSWAP</a></td>
<TD><A HREF="#SFC_SET_COMPRESSION_LEVEL">SFC_SET_COMPRESSION_LEVEL</A></TD>
<TD>Set the compression level.</TD>
</TR>
<TR>
<TD><A HREF="#SFC_RAW_DATA_NEEDS_ENDSWAP">SFC_RAW_DATA_NEEDS_ENDSWAP</a></td>
<TD>Determine if raw data needs endswapping</TD>
</TR>
@@ -206,6 +215,68 @@
<TD>Set the Broadcast Chunk info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_GET_CHANNEL_MAP_INFO">SFC_GET_CHANNEL_MAP_INFO</A></TD>
<TD>Retrieve the channel map info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_SET_CHANNEL_MAP_INFO">SFC_SET_CHANNEL_MAP_INFO</A></TD>
<TD>Set the channel map info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_SET_CART_INFO">SFC_SET_CART_INFO</A></TD>
<TD>Set the Cart Chunk info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_GET_CART_INFO">SFC_GET_CART_INFO</A></TD>
<TD>Retrieve the Cart Chunk info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_GET_LOOP_INFO">SFC_GET_LOOP_INFO</A></TD>
<TD>Get loop info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_GET_INSTRUMENT">SFC_GET_INSTRUMENT</A></TD>
<TD>Get instrument info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_SET_INSTRUMENT">SFC_SET_INSTRUMENT</A></TD>
<TD>Set instrument info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_GET_CUE_COUNT">SFC_GET_CUE_COUNT</A></TD>
<TD>Get the cue marker count</TD>
</TR>
<TR>
<TD><A HREF="#SFC_GET_CUE">SFC_GET_CUE</A></TD>
<TD>Get cue marker info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_SET_CUE">SFC_SET_CUE</A></TD>
<TD>Set cue marker info</TD>
</TR>
<TR>
<TD><A HREF="#SFC_RF64_AUTO_DOWNGRADE">SFC_RF64_AUTO_DOWNGRADE</A></TD>
<TD>Enable auto downgrade from RF64 to WAV</TD>
</TR>
<TR>
<TD><A HREF="#SFC_GET_ORIGINAL_SAMPLERATE">SFC_GET_ORIGINAL_SAMPLERATE</A></TD>
<TD>Get original samplerate</TD>
</TR>
<TR>
<TD><A HREF="#SFC_SET_ORIGINAL_SAMPLERATE">SFC_SET_ORIGINAL_SAMPLERATE</A></TD>
<TD>Set original samplerate</TD>
</TR>
<!--
<TR>
<TD><A HREF="#add-dither">add dither</A></TD>
@@ -231,7 +302,7 @@ Parameters:
sndfile : Not used
cmd : SFC_GET_LIB_VERSION
data : A pointer to a char buffer
datasize : The size of the the buffer
datasize : The size of the buffer
</PRE>
<P>
Example:
@@ -266,7 +337,7 @@ Parameters:
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_LOG_INFO
data : A pointer to a char buffer
datasize : The size of the the buffer
datasize : The size of the buffer
</PRE>
<P>
Example:
@@ -287,6 +358,38 @@ The string returned in the buffer passed to this function will not overflow
the buffer and will always be null terminated .
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_GET_CURRENT_SF_INFO"></A>
<H2><BR><B>SFC_GET_CURRENT_SF_INFO</B></H2>
<P>
Retrieve <CODE>SF_INFO</CODE> struct of opened file.
</P>
<P>
<CODE>SFC_GET_CURRENT_SF_INFO</CODE> command copies <CODE>SF_INFO</CODE> struct of
<CODE>sndfile</CODE> object to provided buffer.
</P>
<P>
Parameters:
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_CURRENT_SF_INFO
data : A pointer to a valid SF_INFO* pointer
datasize : sizeof (SF_INFO)
</PRE>
<P>
Example:
</P>
<PRE>
SF_INFO sfinfo ;
sf_command (sndfile, SFC_GET_CURRENT_SF_INFO, sfinfo, sizeof (SF_INFO)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<DD><DD>Zero on success, non-zero otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_CALC_SIGNAL_MAX"></A>
<H2><BR><B>SFC_CALC_SIGNAL_MAX</B></H2>
@@ -1243,7 +1346,7 @@ Parameters:
</P>
<DL>
<DT>Return value: </DT>
<DD>SF_AMBISONIC_NONE or SF_AMBISONIC_B_FORMAT or zero if the file format
<DD>SF_AMBISONIC_NONE or SF_AMBISONIC_B_FORMAT or zero if the file format
does not support ambisonic formats.
</DL>
@@ -1280,9 +1383,11 @@ This command is currently only supported for files with SF_FORMAT_WAVEX format.
<A NAME="SFC_SET_VBR_ENCODING_QUALITY"></A>
<H2><BR><B>SFC_SET_VBR_ENCODING_QUALITY</B></H2>
<P>
Set the the Variable Bit Rate encoding quality.
Set the Variable Bit Rate encoding quality.
The encoding quality value should be between 0.0 (lowest quality) and 1.0
(highest quality).
Currenly this command is only implemented for FLAC and Ogg/Vorbis files.
It has no effect on un-compressed file formats.
</P>
<P>
Parameters:
@@ -1298,13 +1403,43 @@ The command must be sent before any audio data is written to the file.
<P>
</P>
<DL>
<DT>Return value: </DT>
<DD>Zero on success, non-zero otherwise.
<DT>Return value:</DT>
<dd>SF_TRUE if VBR encoding quality was set.
SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_RAW_NEEDS_ENDSWAP"></A>
<H2><BR><B>SFC_RAW_NEEDS_ENDSWAP</B></H2>
<A NAME="SFC_SET_COMPRESSION_LEVEL"></A>
<H2><BR><B>SFC_SET_COMPRESSION_LEVEL</B></H2>
<P>
Set the compression level.
The compression level should be between 0.0 (minimum compression level) and 1.0
(highest compression level).
Currenly this command is only implemented for FLAC and Ogg/Vorbis files.
It has no effect on un-compressed file formats.
</P>
<P>
Parameters:
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_SET_COMPRESSION_LEVEL
data : A pointer to a double value
datasize : sizeof (double)
</PRE>
<P>
The command must be sent before any audio data is written to the file.
</P>
<P>
</P>
<DL>
<DT>Return value:</DT>
<dd>SF_TRUE if compression level was set.
SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_RAW_DATA_NEEDS_ENDSWAP"></A>
<H2><BR><B>SFC_RAW_DATA_NEEDS_ENDSWAP</B></H2>
<P>
Determine if raw data read using
<a href="api.html#raw">
@@ -1320,7 +1455,7 @@ machine.
Parameters:
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_RAW_NEEDS_ENDSWAP
cmd : SFC_RAW_DATA_NEEDS_ENDSWAP
data : NULL
datasize : 0
</PRE>
@@ -1392,7 +1527,528 @@ Parameters:
<DT>Return value: </DT>
<DD>SF_TRUE if setting the Broadcast Extension chunk was successful and SF_FALSE
otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_GET_CHANNEL_MAP_INFO"></A>
<H2><BR><B>SFC_GET_CHANNEL_MAP_INFO</B></H2>
<P>
Retrieve the channel map contained in an AIFF or CAF Channel Layout chunk.
</P>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_CHANNEL_MAP_INFO
data : a pointer to an array of int, the same size as the number of channels in the file
datasize : number of channels * sizeof (int)
</PRE>
<P>
Channel map positions are defined in an enum in &lt;sndfile.h&gt;.
</P>
<DL>
<DT>Return value: </DT>
<DD>SF_TRUE if the file contained a Channel Layout chunk or SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_SET_CHANNEL_MAP_INFO"></A>
<H2><BR><B>SFC_SET_CHANNEL_MAP_INFO</B></H2>
<P>
Set the channel map contained in an AIFF or CAF Channel Layout chunk.
</P>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_SET_CHANNEL_MAP_INFO
data : a pointer to an array of int, the same size as the number of channels in the file
datasize : number of channels * sizeof (int)
</PRE>
<DL>
<DT>Return value: </DT>
<DD>SF_TRUE if setting the Channel Layout chunk was successful and SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_GET_CART_INFO"></A>
<H2><BR><B>SFC_GET_CART_INFO</B></H2>
<P>Retrieve the Cart Chunk from WAV (and related) files. Based on AES46 standard for CartChunk (see <a href="http://www.cartchunk.org/">CartChunk.org</a> for more information.
</P>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_CART_INFO
data : a pointer to an SF_CART_INFO struct
datasize : sizeof (SF_CART_INFO)
</PRE>
<P>
The SF_CART_INFO struct is defined in &lt;sndfile.h&gt; as:
</P>
<PRE>
#define SF_CART_INFO_VAR(p_tag_text_size) \
struct
{ char version [4] ;
char title [64] ;
char artist [64] ;
char cut_id [64] ;
char client_id [64] ;
char category [64] ;
char classification [64] ;
char out_cue [64] ;
char start_date [10] ;
char start_time [8] ;
char end_date [10] ;
char end_time [8] ;
char producer_app_id [64] ;
char producer_app_version [64] ;
char user_def [64] ;
long level_reference ;
SF_CART_TIMER post_timers [8] ;
char reserved [276] ;
char url [1024] ;
unsigned int tag_text_size ;
char tag_text[p_tag_text_size] ;
}
</PRE>
<DL>
<DT>Return value: </DT>
<DD>SF_TRUE if the file contained a Cart chunk or SF_FALSE
otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_SET_CART_INFO"></A>
<H2><BR><B>SFC_SET_CART_INFO</B></H2>
<P>
Set the Cart Chunk for WAV (and related) files.
</P>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_SET_CART_INFO
data : a pointer to an SF_CART_INFO struct
datasize : sizeof (SF_CART_INFO)
</PRE>
<DL>
<DT>Return value: </DT>
<DD>SF_TRUE if setting the Cart chunk was successful and SF_FALSE
otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_GET_LOOP_INFO"></A>
<H2><BR><B>SFC_GET_LOOP_INFO</B></H2>
<P>
Retrieve loop information for file including time signature, length in
beats and original MIDI base note
</P>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_LOOP_INFO
data : a pointer to an SF_LOOP_INFO struct
datasize : sizeof (SF_LOOP_INFO)
</PRE>
<P>
The SF_BROADCAST_INFO struct is defined in &lt;sndfile.h&gt; as:
</P>
<PRE>
typedef struct
{ short time_sig_num ; /* any positive integer > 0 */
short time_sig_den ; /* any positive power of 2 > 0 */
int loop_mode ; /* see SF_LOOP enum */
int num_beats ; /* this is NOT the amount of quarter notes !!!*/
/* a full bar of 4/4 is 4 beats */
/* a full bar of 7/8 is 7 beats */
float bpm ; /* suggestion, as it can be calculated using other fields:*/
/* file's lenght, file's sampleRate and our time_sig_den*/
/* -> bpms are always the amount of _quarter notes_ per minute */
int root_key ; /* MIDI note, or -1 for None */
int future [6] ;
} SF_LOOP_INFO ;
</PRE>
<P>
Example:
</P>
<PRE>
SF_LOOP_INFO loop;
sf_command (sndfile, SFC_GET_LOOP_INFO, &amp;loop, sizeof (loop)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<DD>SF_TRUE if the file header contains loop information for the file.
SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_GET_INSTRUMENT"></A>
<H2><BR><B>SFC_GET_INSTRUMENT</B></H2>
<P>
Retrieve instrument information from file including MIDI base note,
keyboard mapping and looping informations(start/stop and mode).
</P>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_INSTRUMENT
data : a pointer to an SF_INSTRUMENT struct
datasize : sizeof (SF_INSTRUMENT)
</PRE>
<P>
The SF_INSTRUMENT struct is defined in &lt;sndfile.h&gt; as:
</P>
<PRE>
enum
{ /*
** The loop mode field in SF_INSTRUMENT will be one of the following.
*/
SF_LOOP_NONE = 800,
SF_LOOP_FORWARD,
SF_LOOP_BACKWARD,
SF_LOOP_ALTERNATING
} ;
typedef struct
{ int gain ;
char basenote, detune ;
char velocity_lo, velocity_hi ;
char key_lo, key_hi ;
int loop_count ;
struct
{ int mode ;
unsigned int start ;
unsigned int end ;
unsigned int count ;
} loops [16] ; /* make variable in a sensible way */
} SF_INSTRUMENT ;
</PRE>
<P>
Example:
</P>
<PRE>
SF_INSTRUMENT inst ;
sf_command (sndfile, SFC_GET_INSTRUMENT, &amp;inst, sizeof (inst)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<dd>SF_TRUE if the file header contains instrument information for the
file. SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_SET_INSTRUMENT"></A>
<H2><BR><B>SFC_SET_INSTRUMENT</B></H2>
<P>
Set the instrument information for the file.
</P>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_SET_INSTRUMENT
data : a pointer to an SF_INSTRUMENT struct
datasize : sizeof (SF_INSTRUMENT)
</PRE>
<P>
Example:
</P>
<PRE>
SF_INSTRUMENT inst ;
sf_command (sndfile, SFC_SET_INSTRUMENT, &amp;inst, sizeof (inst)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<dd>SF_TRUE if the file header contains instrument information for the
file. SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_GET_CUE"></A>
<H2><BR><B>SFC_GET_CUE_COUNT</B></H2>
<P>
Retrieve the number of cue markers available for retrieval using the
SFC_GET_CUE command.
</P>
<P>
Parameters:
</P>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_CUE
data : a pointer to a uint32_t
datasize : sizeof (uint32_t)
</PRE>
<P>
Example:
</P>
<PRE>
uint32_t cue_count ;
sf_command (sndfile, SFC_GET_CUE_COUNT, &amp;cue_count, sizeof (cue_count)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<dd>SF_TRUE if the file header contains cue marker information for the
file. SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_GET_CUE"></A>
<H2><BR><B>SFC_GET_CUE</B></H2>
<P>
Retrieve cue marker information from file.
</P>
<P>
Parameters:
</P>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_CUE
data : a pointer to an SF_CUES struct
datasize : sizeof (SF_CUES)
</PRE>
<P>
The SF_CUES struct is defined in &lt;sndfile.h&gt; as:
</P>
<PRE>
typedef struct
{ int cue_count ;
struct
{ int32_t indx ;
uint32_t position ;
int32_t fcc_chunk ;
int32_t chunk_start ;
int32_t block_start ;
uint32_t sample_offset ;
char name [256] ;
} cue_points [100] ;
} SF_CUES ;
</PRE>
<P>
There is also an SF_CUES_VAR #define that allows reading/writing more than 100
cue markers.
</P>
<P>
Example:
</P>
<PRE>
SF_CUES cues ;
sf_command (sndfile, SFC_GET_CUE, &amp;cues, sizeof (cues)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<dd>SF_TRUE if the file header contains cue marker information for the
file. SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_SET_CUE"></A>
<H2><BR><B>SFC_SET_CUE</B></H2>
<P>
Set the cue marker information for the file.
</P>
<P>
Parameters:
</P>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_SET_CUE
data : a pointer to an SF_CUES struct
datasize : sizeof (SF_CUES)
</PRE>
<P>
Example:
</P>
<PRE>
SF_CUES cues ;
sf_command (sndfile, SFC_SET_CUE, &amp;cues, sizeof (cues)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<dd>SF_TRUE if the file header contains cue marker information for the
file. SF_FALSE otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_RF64_AUTO_DOWNGRADE"></A>
<H2><BR><B>SFC_RF64_AUTO_DOWNGRADE</B></H2>
<P>
Enable auto downgrade from RF64 to WAV.
</P>
<P>
The EBU recomendation is that when writing RF64 files and the resulting file is
less than 4Gig in size, it should be downgraded to a WAV file (WAV files have a
maximum size of 4Gig).
libsndfile doesn't follow the EBU recommendations exactly, , mainly because the
test suite needs to be able test reading/writing RF64 files without having to
generate files larger than 4 gigabytes.
</P>
<p>
Note: This command should be issued before the first bit of audio data has been
written to the file.
Calling this command after audio data has been written will return the current
value of this setting, but will not allow it to be changed.
</p>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_RF64_AUTO_DOWNGRADE
data : NULL
datasize : SF_TRUE or SF_FALSE
</PRE>
<P>
Example:
</P>
<PRE>
/* Enable auto downgrade on file close. */
sf_command (sndfile, SFC_RF64_AUTO_DOWNGRADE, NULL, SF_TRUE) ;
</PRE>
<DL>
<DT>Return value:</DT>
<dd>Returns SF_TRUE if SFC_RF64_AUTO_DOWNGRADE is set and SF_FALSE
otherwise.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_GET_ORIGINAL_SAMPLERATE"></A>
<H2><BR><B>SFC_GET_ORIGINAL_SAMPLERATE</B></H2>
<P>
Get original samplerate metadata.
</P>
<P>
The Opus audio codec stores audio data independent of samplerate, but only
supports encoding or decoding at 8000Hz, 12000Hz, 16000Hz, 24000HZ or 48000Hz.
Opus includes a header field to record the original source input samplerate, and
a samplerate converter may be used if needed.
</p>
<P>
This command gets the original samplerate header field. It does not enable any
(non-existent) samplerate conversion, nor change the current decoder samplerate.
</P>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_GET_ORIGINAL_SAMPLERATE
data : pointer to an integer
datasize : sizeof (int)
</PRE>
<P>
Example:
</P>
<PRE>
/* Get the original sample rate */
int original_samplerate ;
sf_command (sndfile, SFC_GET_ORIGINAL_SAMPLERATE, &amp;original_samplerate, sizeof (original_samplerate)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<dd>Returns SF_TRUE on success, SF_FALSE otherwise.
<dd>The passed integer is set to the value of the original samplerate.
</DL>
<!-- ========================================================================= -->
<A NAME="SFC_SET_ORIGINAL_SAMPLERATE"></A>
<H2><BR><B>SFC_SET_ORIGINAL_SAMPLERATE</B></H2>
<P>
Set original samplerate metadata.
</P>
<P>
The Opus audio codec stores audio data independent of samplerate, but only
supports encoding or decoding at 8000Hz, 12000Hz, 16000Hz, 24000HZ or 48000Hz.
Opus includes a header field to record the original source input samplerate, and
a samplerate converter may be used if needed.
</p>
<p>
When writing an Opus file this command sets the original samplerate header field
to the provided value, which is then stored in the file. This has no effect on
the current encoder samplerate.
</p>
<p>
When reading an Opus file this command overrides the original samplerate value
as read from the file. libsndfile uses this value to choose what samplerate
to decode at, rounding up to the nearest valid Opus samplerate. After a
successful call, the file samplerate and frames count may have changed.
</p>
<p>
Note: This command should be issued before the first bit of audio data has been
read from or written to the file.
</p>
<p>
Parameters:
</p>
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_SET_ORIGINAL_SAMPLERATE
data : pointer to an integer
datasize : sizeof (int)
</PRE>
<P>
Example:
</P>
<PRE>
/* Store the original sample rate as 44100 */
int original_samplerate 44100;
sf_command (sndfile, SFC_SET_ORIGINAL_SAMPLERATE, &amp;original_samplerate, sizeof (input_samplerate)) ;
</PRE>
<DL>
<DT>Return value:</DT>
<dd>Returns SF_TRUE on success, SF_FALSE otherwise.
<dd>On write, can only succeed if no data has been written.
<dd>On read, if successful, <a HREF="#SFC_GET_CURRENT_SF_INFO">SFC_GET_CURRENT_SF_INFO</a>
should be called to determine the new frames count and samplerate
</DL>
<!-- ========================================================================= -->
@@ -1402,7 +2058,7 @@ Parameters:
<A HREF="http://www.mega-nerd.com/libsndfile/">
http://www.mega-nerd.com/libsndfile/</A>.
<BR>
Version : 1.0.24
Version : 1.0.25
</P>
</BODY>