mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-21 03:18:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@172267 c90b9560-bf6c-de11-be94-00142212c4b1
75 lines
2.4 KiB
XML
75 lines
2.4 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.6 $ -->
|
|
<!-- splitted from ./en/functions/ming.xml, last change in rev 1.24 -->
|
|
<refentry id="function.swfmovie.streammp3">
|
|
<refnamediv>
|
|
<refname>SWFMovie->streammp3</refname>
|
|
<refpurpose>Streams a MP3 file</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>void</type><methodname>swfmovie->streammp3</methodname>
|
|
<methodparam><type>mixed</type><parameter>mp3File</parameter></methodparam>
|
|
</methodsynopsis>
|
|
&warn.experimental.func;
|
|
<para>
|
|
<function>swfmovie->streammp3</function> streams the mp3 file
|
|
<parameter>mp3File</parameter>. Not very robust in dealing with
|
|
oddities (can skip over an initial ID3 tag, but that's about it).
|
|
Like <function>swfshape->addjpegfill</function>, this isn't a stable function- we'll
|
|
probably need to make a separate SWFSound object to contain sound types.
|
|
Parameter <parameter>mp3File</parameter> can be a
|
|
<function>fopen</function> resource or a binary string.
|
|
</para>
|
|
<para>
|
|
Note that the movie isn't smart enough to put enough frames in to contain
|
|
the entire mp3 stream- you'll have to add (length of song * frames per second)
|
|
frames to get the entire stream in.
|
|
</para>
|
|
<para>
|
|
Yes, now you can use ming to put that rock and roll devil worship music
|
|
into your SWF files. Just don't tell the RIAA.
|
|
<example>
|
|
<title><function>swfmovie->streammp3</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$m = new SWFMovie();
|
|
$m->setRate(12.0);
|
|
$m->streamMp3(file_get_contents("distortobass.mp3"));
|
|
// use your own MP3
|
|
|
|
// 11.85 seconds at 12.0 fps = 142 frames
|
|
$m->setFrames(142);
|
|
|
|
header('Content-type: application/x-shockwave-flash');
|
|
$m->output();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|