85 lines
6.3 KiB
HTML
85 lines
6.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>FLAC: Porting Guide for New Versions</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">FLAC<span id="projectnumber"> 1.5.0</span>
|
|
</div>
|
|
<div id="projectbrief">Free Lossless Audio Codec</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.8 -->
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',false,false,'search.php','Search');
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#groups">Modules</a> </div>
|
|
<div class="headertitle"><div class="title">Porting Guide for New Versions</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
|
|
Modules</h2></td></tr>
|
|
<tr class="memitem:group__porting__1__1__2__to__1__1__3" id="r_group__porting__1__1__2__to__1__1__3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__porting__1__1__2__to__1__1__3.html">Porting from FLAC 1.1.2 to 1.1.3</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:group__porting__1__1__3__to__1__1__4" id="r_group__porting__1__1__3__to__1__1__4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__porting__1__1__3__to__1__1__4.html">Porting from FLAC 1.1.3 to 1.1.4</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:group__porting__1__1__4__to__1__2__0" id="r_group__porting__1__1__4__to__1__2__0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__porting__1__1__4__to__1__2__0.html">Porting from FLAC 1.1.4 to 1.2.0</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:group__porting__1__3__4__to__1__4__0" id="r_group__porting__1__3__4__to__1__4__0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__porting__1__3__4__to__1__4__0.html">Porting from FLAC 1.3.4 to 1.4.0</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:group__porting__1__4__3__to__1__5__0" id="r_group__porting__1__4__3__to__1__5__0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__porting__1__4__3__to__1__5__0.html">Porting from FLAC 1.4.3 to 1.5.0</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>This module describes differences in the library interfaces from version to version. It assists in the porting of code that uses the libraries to newer versions of FLAC.</p>
|
|
<p>One simple facility for making porting easier that has been added in FLAC 1.1.3 is a set of #defines in <code>export.h</code> of each library's includes (e.g. <code><a class="el" href="FLAC_2export_8h.html" title="This module contains #defines and symbols for exporting function calls, and providing version informa...">include/FLAC/export.h</a></code>). The #defines mirror the libraries' <a href="http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning">libtool version numbers</a>, e.g. in libFLAC there are <code>FLAC_API_VERSION_CURRENT</code>, <code>FLAC_API_VERSION_REVISION</code>, and <code>FLAC_API_VERSION_AGE</code>. These can be used to support multiple versions of an API during the transition phase, e.g.</p>
|
|
<div class="fragment"><div class="line"><span class="preprocessor">#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT <= 7</span></div>
|
|
<div class="line"> legacy code</div>
|
|
<div class="line"><span class="preprocessor">#else</span></div>
|
|
<div class="line"> <span class="keyword">new</span> code</div>
|
|
<div class="line"><span class="preprocessor">#endif</span></div>
|
|
</div><!-- fragment --><p>The source will work for multiple versions and the legacy code can easily be removed when the transition is complete.</p>
|
|
<p>Another available symbol is FLAC_API_SUPPORTS_OGG_FLAC (defined in <a class="el" href="FLAC_2export_8h.html" title="This module contains #defines and symbols for exporting function calls, and providing version informa...">include/FLAC/export.h</a>), which can be used to determine whether or not the library has been compiled with support for Ogg FLAC. This is simpler than trying to call an Ogg init function and catching the error. </p>
|
|
</div><!-- contents -->
|
|
|
|
<hr size="1"/>
|
|
Copyright (c) 2000-2009 Josh Coalson
|
|
Copyright (c) 2011-2025 Xiph.Org Foundation
|
|
<!-- Copyright (c) 2000-2009 Josh Coalson -->
|
|
<!-- Copyright (c) 2011-2025 Xiph.Org Foundation -->
|
|
<!-- Permission is granted to copy, distribute and/or modify this document -->
|
|
<!-- under the terms of the GNU Free Documentation License, Version 1.3 -->
|
|
<!-- or any later version published by the Free Software Foundation; -->
|
|
<!-- with no invariant sections. -->
|
|
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
|
|
</body>
|
|
</html>
|