<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="filesr">
  <refmeta>
    <refentrytitle>filesr</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>filesr</refname>
    <refpurpose>
      Returns the sample rate of a sound file.
      <indexterm id="IndexFilesr"><primary>filesr</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns the sample rate of a sound file.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ir <command>filesr</command> ifilcod</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ifilcod</emphasis> -- sound file to be queried
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>filesr</emphasis> returns the sample rate of the sound file <emphasis>ifilcod</emphasis>.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the filesr opcode. It uses the files <ulink url="examples/filesr.orc"><citetitle>filesr.orc</citetitle></ulink>, <ulink url="examples/filesr.sco"><citetitle>filesr.sco</citetitle></ulink>,
and <ulink url="examples/mary.wav"><citetitle>mary.wav</citetitle></ulink>.

      <example>
        <title>Example of the filesr opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/filesr.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/filesr.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>

      The audio file <quote>mary.wav</quote> was sampled at 44.1 KHz. So <emphasis>filesr</emphasis>'s output should include a line like this:
      <screen>
instr 1:  isr = 44100.000
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="filelen"><citetitle>filelen</citetitle></link>,
      <link linkend="filenchnls"><citetitle>filenchnls</citetitle></link>,
      <link linkend="filepeak"><citetitle>filepeak</citetitle></link>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namematt;</member>
        <member>July 1999</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>

    <para>New in Csound version 3.57</para>
  </refsect1>
</refentry>
