mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
command.html : Improve documentation of SF_GET_FORMAT_SUBTYPE.
This commit is contained in:
parent
dbf5e65ac5
commit
e709804f30
@ -1,3 +1,8 @@
|
||||
2005-08-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/command.html
|
||||
Improve documentation of SF_GET_FORMAT_SUBTYPE.
|
||||
|
||||
2005-08-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* examples/sndfile-convert.c
|
||||
|
@ -3,7 +3,7 @@
|
||||
dnl Require autoconf version
|
||||
AC_PREREQ(2.53)
|
||||
|
||||
AC_INIT(libsndfile,1.0.12pre10,erikd@mega-nerd.com)
|
||||
AC_INIT(libsndfile,1.0.12pre11,erikd@mega-nerd.com)
|
||||
AC_CONFIG_SRCDIR([src/sndfile.c])
|
||||
AC_CANONICAL_TARGET([])
|
||||
|
||||
|
@ -766,7 +766,13 @@ Example:
|
||||
<A NAME="SFC_GET_FORMAT_SUBTYPE"></A>
|
||||
<H2><BR><B>SFC_GET_FORMAT_SUBTYPE</B></H2>
|
||||
<P>
|
||||
Retrieve information about a subformat.
|
||||
Enumerate the subtypes (this function does not translate a sub type into
|
||||
a string describing that subtype).
|
||||
A typical use case might be retrieving a string description of all subtypes
|
||||
so that a dialog box can be filled in.
|
||||
</P>
|
||||
<P>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
Parameters:
|
||||
@ -778,7 +784,7 @@ Parameters:
|
||||
datasize : sizeof (SF_FORMAT_INFO)
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
Example 1: Retrieve all subytpes supported by the WAV format.
|
||||
</P>
|
||||
<PRE>
|
||||
SF_FORMAT_INFO format_info ;
|
||||
@ -786,7 +792,6 @@ Example:
|
||||
|
||||
sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE_COUNT, &count, sizeof (int)) ;
|
||||
|
||||
/* Retrieve all the subtypes supported by the WAV format. */
|
||||
for (k = 0 ; k < count ; k++)
|
||||
{ format_info.format = k ;
|
||||
sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE, &format_info, sizeof (format_info)) ;
|
||||
@ -796,6 +801,24 @@ Example:
|
||||
} ;
|
||||
</PRE>
|
||||
<P>
|
||||
Example 2: Print a string describing the SF_FORMAT_PCM_16 subtype.
|
||||
</P>
|
||||
<PRE>
|
||||
SF_FORMAT_INFO format_info ;
|
||||
int k, count ;
|
||||
|
||||
sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE_COUNT, &count, sizeof (int)) ;
|
||||
|
||||
for (k = 0 ; k < count ; k++)
|
||||
{ format_info.format = k ;
|
||||
sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE, &format_info, sizeof (format_info)) ;
|
||||
if (format_info.format == SF_FORMAT_PCM_16)
|
||||
{ printf ("%08x %s\n", format_info.format, format_info.name) ;
|
||||
break ;
|
||||
} ;
|
||||
} ;
|
||||
</PRE>
|
||||
<P>
|
||||
For a more comprehensive example, see the program list_formats.c in the examples/
|
||||
directory of the libsndfile source code distribution.
|
||||
</P>
|
||||
@ -1060,9 +1083,10 @@ The SF_FORMAT_INFO struct is defined in <sndfile.h> as:
|
||||
sf_count_t length ;
|
||||
} SF_EMBED_FILE_INFO ;
|
||||
</PRE>
|
||||
<DL>
|
||||
<DT>Return value: </DT>
|
||||
<DD>0 on success and non-zero otherwise.
|
||||
<DD>The value of the offset field of the SF_EMBED_FILE_INFO struct will be
|
||||
<DD>The value of the offset field of the SF_EMBED_FILE_INFO struct will be
|
||||
the offsets in bytes from the start of the outer file to the start of
|
||||
the audio file.
|
||||
<DD>The value of the offset field of the SF_EMBED_FILE_INFO struct will be
|
||||
|
Loading…
Reference in New Issue
Block a user