Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 12646

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Audio streams</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="wrappers.rar.html">rar://</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="wrappers.expect.html">expect://</a></div>
 <div class="up"><a href="wrappers.html">Supported Protocols and Wrappers</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="wrappers.audio" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ogg://</h1>
  <p class="refpurpose"><span class="refname">ogg://</span> &mdash; <span class="dc-title">Audio streams</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-wrappers.audio-description">
  <h3 class="title">Description</h3>
  <p class="para">
   Files opened for reading via the <var class="filename">ogg://</var> wrapper
   are treated as compressed audio encoded using the <em>OGG/Vorbis</em> codec.
   Similarly, files opened for writing or appending via the
   <var class="filename">ogg://</var> wrapper are writen as compressed audio data.
    <span class="function"><a href="function.stream-get-meta-data.html" class="function">stream_get_meta_data()</a></span>, when used on an <em>OGG/Vorbis</em>
   file opened for reading will return various details about the stream
   including the <em><code class="parameter">vendor</code></em> tag, any included
   <em><code class="parameter">comments</code></em>, the number of
   <em><code class="parameter">channels</code></em>, the sampling <em><code class="parameter">rate</code></em>,
   and the encoding rate range described by:
   <em><code class="parameter">bitrate_lower</code></em>, <em><code class="parameter">bitrate_upper</code></em>,
   <em><code class="parameter">bitrate_nominal</code></em>, and <em><code class="parameter">bitrate_window</code></em>.
  </p>

  <p class="simpara"><var class="filename">ogg://</var> PHP 4.3.0 and up (PECL) </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <strong>This wrapper is not enabled by default</strong><br />
   <span class="simpara">
    In order to use the <var class="filename">ogg://</var> wrapper you must install
    the <a href="http://pecl.php.net/package/oggvorbis" class="link external">&raquo;&nbsp;OGG/Vorbis</a> extension
    available from <a href="http://pecl.php.net/" class="link external">&raquo;&nbsp;PECL</a>.
   </span>
  </p></blockquote>
 </div>


 <div class="refsect1 usage" id="refsect1-wrappers.audio-usage"> 
  <h3 class="title">Usage</h3>
  <ul class="itemizedlist">
   <li class="listitem"><span class="simpara"><var class="filename">ogg://soundfile.ogg</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">ogg:///path/to/soundfile.ogg</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">ogg://http://www.example.com/path/to/soundstream.ogg</var></span></li>
  </ul>
 </div>
 

 <div class="refsect1 options" id="refsect1-wrappers.audio-options">
  <h3 class="title">Options</h3>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Wrapper Summary</strong></caption>
    
     <thead>
      <tr>
       <th>Attribute</th>
       <th>Supported</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>Restricted by <a href="filesystem.configuration.html#ini.allow-url-fopen" class="link">allow_url_fopen</a></td>
       <td>No</td>
      </tr>

      <tr>
       <td>Allows Reading</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Writing</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Appending</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Simultaneous Reading and Writing</td>
       <td>No</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.stat.html" class="function">stat()</a></span></td>
       <td>No</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.unlink.html" class="function">unlink()</a></span></td>
       <td>No</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.rename.html" class="function">rename()</a></span></td>
       <td>No</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.mkdir.html" class="function">mkdir()</a></span></td>
       <td>No</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.rmdir.html" class="function">rmdir()</a></span></td>
       <td>No</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  
  <p class="para">
   <table class="doctable table">
    <caption><strong>Context options</strong></caption>
    
     <thead>
      <tr>
       <th>Name</th>
       <th>Usage</th>
       <th>Default</th>
       <th>Mode</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><em>pcm_mode</em></td>
       <td>
        PCM encoding to apply while reading, one of:
        <strong><code>OGGVORBIS_PCM_U8</code></strong>, <strong><code>OGGVORBIS_PCM_S8</code></strong>,
        <strong><code>OGGVORBIS_PCM_U16_BE</code></strong>, <strong><code>OGGVORBIS_PCM_S16_BE</code></strong>,
        <strong><code>OGGVORBIS_PCM_U16_LE</code></strong>, and <strong><code>OGGVORBIS_PCM_S16_LE</code></strong>.
        (8 vs 16 bit, signed or unsigned, big or little <em>endian</em>)
       </td>
       <td>OGGVORBIS_PCM_S16_LE</td>
       <td>Read</td>
      </tr>

      <tr>
       <td><em>rate</em></td>
       <td>
        Sampling rate of input data, expressed in Hz
       </td>
       <td>44100</td>
       <td>Write/Append</td>
      </tr>

      <tr>
       <td><em>bitrate</em></td>
       <td>
        When given as an integer, the fixed bitrate at which to encode. (16000 to 131072)
        When given as a float, the variable bitrate quality to use. (-1.0 to 1.0)
       </td>
       <td>128000</td>
       <td>Write/Append</td>
      </tr>

      <tr>
       <td><em>channels</em></td>
       <td>
        The number of audio channels to encode, typically 1 (Mono), or 2 (Stereo).
        May range as high as 16.
       </td>
       <td>2</td>
       <td>Write/Append</td>
      </tr>

      <tr>
       <td><em>comments</em></td>
       <td>
        An array of string values to encode into the track header.
       </td>
       <td class="empty">&nbsp;</td>
       <td>Write/Append</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>
 

 <div class="refsect1 examples" id="refsect1-wrappers.audio-examples">
  <h3 class="title">Examples</h3>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="wrappers.rar.html">rar://</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="wrappers.expect.html">expect://</a></div>
 <div class="up"><a href="wrappers.html">Supported Protocols and Wrappers</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>