Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improve sf_command documentation
* move SFC_SET_ADD_HEADER_PAD_CHUNK to deprecated section
* document SFC_GET/SET_CHANNEL_MAP_INFO
* docs: fix typo in command.html
* docs: fix typo in name of command

Closes:  #422
  • Loading branch information
mossheim authored and erikd committed Sep 18, 2018
1 parent 83c0d85 commit 2d65881
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 8 deletions.
69 changes: 63 additions & 6 deletions doc/command.html
Expand Up @@ -181,12 +181,12 @@ <H1><B>sf_command</B></H1>
</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>

Expand All @@ -201,7 +201,7 @@ <H1><B>sf_command</B></H1>
</TR>

<TR>
<TD><A HREF="#SFC_RAW_NEEDS_ENDSWAP">SFC_RAW_NEEDS_ENDSWAP</a></td>
<TD><A HREF="#SFC_RAW_DATA_NEEDS_ENDSWAP">SFC_RAW_DATA_NEEDS_ENDSWAP</a></td>
<TD>Determine if raw data needs endswapping</TD>
</TR>

Expand All @@ -215,6 +215,16 @@ <H1><B>sf_command</B></H1>
<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>
Expand Down Expand Up @@ -1421,8 +1431,8 @@ <H2><BR><B>SFC_SET_COMPRESSION_LEVEL</B></H2>
</DL>

<!-- ========================================================================= -->
<A NAME="SFC_RAW_NEEDS_ENDSWAP"></A>
<H2><BR><B>SFC_RAW_NEEDS_ENDSWAP</B></H2>
<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">
Expand All @@ -1438,7 +1448,7 @@ <H2><BR><B>SFC_RAW_NEEDS_ENDSWAP</B></H2>
Parameters:
<PRE>
sndfile : A valid SNDFILE* pointer
cmd : SFC_RAW_NEEDS_ENDSWAP
cmd : SFC_RAW_DATA_NEEDS_ENDSWAP
data : NULL
datasize : 0
</PRE>
Expand Down Expand Up @@ -1513,6 +1523,53 @@ <H2><BR><B>SFC_SET_BROADCAST_INFO</B></H2>

</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>
Expand Down
5 changes: 3 additions & 2 deletions src/sndfile.h.in
Expand Up @@ -164,7 +164,6 @@ enum
SFC_GET_MAX_ALL_CHANNELS = 0x1045,

SFC_SET_ADD_PEAK_CHUNK = 0x1050,
SFC_SET_ADD_HEADER_PAD_CHUNK = 0x1051,

SFC_UPDATE_HEADER_NOW = 0x1060,
SFC_SET_UPDATE_HEADER_AUTO = 0x1061,
Expand Down Expand Up @@ -223,11 +222,13 @@ enum
SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,

/*
** SFC_SET_ADD_* values are deprecated and will disappear at some
** These SFC_SET_ADD_* values are deprecated and will disappear at some
** time in the future. They are guaranteed to be here up to and
** including version 1.0.8 to avoid breakage of existing software.
** They currently do nothing and will continue to do nothing.
*/
SFC_SET_ADD_HEADER_PAD_CHUNK = 0x1051,

SFC_SET_ADD_DITHER_ON_WRITE = 0x1070,
SFC_SET_ADD_DITHER_ON_READ = 0x1071
} ;
Expand Down

0 comments on commit 2d65881

Please sign in to comment.