PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<Secure Shell 2List of Available Filters>
Last updated: Mon, 16 Jul 2012

音频流

ogg:// PHP 4.3.0 及更高版本 (PECL)

  • ogg://soundfile.ogg

  • ogg:///path/to/soundfile.ogg

  • ogg://http://www.example.com/path/to/soundstream.ogg

此封装器默认没有启用: 要使用 ogg:// 封装器,您必须安装 OGG/Vorbis 扩展。可用在 PECL 找到。

通过 ogg:// 封装器打开的文件,被当作使用 OGG/Vorbis 编码压缩的音频文件来读取。类似地,通过 ogg:// 封装器写入或附加的文件,被当作使用 OGG/Vorbis 编码压缩的音频文件来写入。 stream_get_meta_data(),当使用在打开读取的 OGG/Vorbis 文件时,返回该文件流的详细信息,包括:vendor 标签, commentschannels, rate 采样率, 和编码范围。编码范围用如下参数描述: bitrate_lower, bitrate_upper, bitrate_nominal, 和 bitrate_window

表格 L-10. 封装协议摘要

属性支持
受限于 allow_url_fopen
允许读取
允许写入
允许附加
允许同时读写
支持 stat()
支持 unlink()
支持 rename()
支持 mkdir()
支持 rmdir()

表格 L-11. 上下文选项

名称用法默认模式
pcm_mode 读取时使用如下 PCM 编码之一: OGGVORBIS_PCM_U8, OGGVORBIS_PCM_S8, OGGVORBIS_PCM_U16_BE, OGGVORBIS_PCM_S16_BE, OGGVORBIS_PCM_U16_LE, 和 OGGVORBIS_PCM_S16_LE。 (8 或 16 位,签名或未签名,大或小的 endian) OGGVORBIS_PCM_S16_LE读取
rate 输入数据的采样率,单位为 Hz 44100写入/附加
bitrate 若给的值为整数,则是用固定的比特率进行编码。(16000 到 131072) 若给的值为浮点数,则使用可变的比特率品质。(-1.0 到 1.0) 128000写入/附加
channels 要编码的声道的数量,典型为 1 (单声道), 或 2 (立体声)。最高支持 16 声道。 2写入/附加
comments 编码到音轨头部的字符串数组。  写入/附加




<Secure Shell 2List of Available Filters>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST