1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>API exported by pygame.mixer — pygame v2.1.2 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/pygame.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="shortcut icon" href="../_static/pygame.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Class Rect API exported by pygame.rect" href="rect.html" />
<link rel="prev" title="API exported by pygame._freetype" href="freetype.html" />
</head><body>
<div class="document">
<div class="header">
<table>
<tr>
<td class="logo">
<a href="https://www.pygame.org/">
<img src="../_static/pygame_tiny.png"/>
</a>
<h5>pygame documentation</h5>
</td>
<td class="pagelinks">
<div class="top">
<a href="https://www.pygame.org/">Pygame Home</a> ||
<a href="../index.html">Help Contents</a> ||
<a href="../genindex.html">Reference Index</a>
<form action="../search.html" method="get" style="display:inline;float:right;">
<input name="q" value="" type="text">
<input value="search" type="submit">
</form>
</div>
<hr style="color:black;border-bottom:none;border-style: dotted;border-bottom-style:none;">
<p class="bottom"><b>Most useful stuff</b>:
<a href="../ref/color.html">Color</a> |
<a href="../ref/display.html">display</a> |
<a href="../ref/draw.html">draw</a> |
<a href="../ref/event.html">event</a> |
<a href="../ref/font.html">font</a> |
<a href="../ref/image.html">image</a> |
<a href="../ref/key.html">key</a> |
<a href="../ref/locals.html">locals</a> |
<a href="../ref/mixer.html">mixer</a> |
<a href="../ref/mouse.html">mouse</a> |
<a href="../ref/rect.html">Rect</a> |
<a href="../ref/surface.html">Surface</a> |
<a href="../ref/time.html">time</a> |
<a href="../ref/music.html">music</a> |
<a href="../ref/pygame.html">pygame</a>
</p>
<p class="bottom"><b>Advanced stuff</b>:
<a href="../ref/cursors.html">cursors</a> |
<a href="../ref/joystick.html">joystick</a> |
<a href="../ref/mask.html">mask</a> |
<a href="../ref/sprite.html">sprite</a> |
<a href="../ref/transform.html">transform</a> |
<a href="../ref/bufferproxy.html">BufferProxy</a> |
<a href="../ref/freetype.html">freetype</a> |
<a href="../ref/gfxdraw.html">gfxdraw</a> |
<a href="../ref/midi.html">midi</a> |
<a href="../ref/pixelarray.html">PixelArray</a> |
<a href="../ref/pixelcopy.html">pixelcopy</a> |
<a href="../ref/sndarray.html">sndarray</a> |
<a href="../ref/surfarray.html">surfarray</a> |
<a href="../ref/math.html">math</a>
</p>
<p class="bottom"><b>Other</b>:
<a href="../ref/camera.html">camera</a> |
<a href="../ref/sdl2_controller.html#module-pygame._sdl2.controller">controller</a> |
<a href="../ref/examples.html">examples</a> |
<a href="../ref/fastevent.html">fastevent</a> |
<a href="../ref/scrap.html">scrap</a> |
<a href="../ref/tests.html">tests</a> |
<a href="../ref/touch.html">touch</a> |
<a href="../ref/pygame.html#module-pygame.version">version</a>
</p>
</td>
</tr>
</table>
</div>
<div class="documentwrapper">
<div class="body" role="main">
<section id="api-exported-by-pygame-mixer">
<section id="src-c-mixer-c">
<h2>src_c/mixer.c<a class="headerlink" href="#src-c-mixer-c" title="Permalink to this headline">¶</a></h2>
<p>Python types and module startup/shutdown functions defined in the
<a class="tooltip reference internal" href="../ref/mixer.html#module-pygame.mixer" title=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">pygame.mixer</span></code><span class="tooltip-content">pygame module for loading and playing sounds</span></a> extension module.</p>
<p>Header file: src_c/include/pygame_mixer.h</p>
<dl class="c type">
<dt class="sig sig-object c" id="c.pgSoundObject">
<span class="k"><span class="pre">type</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pgSoundObject</span></span></span><a class="headerlink" href="#c.pgSoundObject" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>The <a class="reference internal" href="../ref/mixer.html#pygame.mixer.Sound" title="pygame.mixer.Sound"><code class="xref py py-class docutils literal notranslate"><span class="pre">pygame.mixer.Sound</span></code></a> instance C structure.</p>
</dd></dl>
<dl class="c var">
<dt class="sig sig-object c" id="c.pgSound_Type">
<span class="n"><span class="pre">PyTypeObject</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">pgSound_Type</span></span></span><a class="headerlink" href="#c.pgSound_Type" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>The <a class="reference internal" href="../ref/mixer.html#pygame.mixer.Sound" title="pygame.mixer.Sound"><code class="xref py py-class docutils literal notranslate"><span class="pre">pygame.mixer.Sound</span></code></a> Python type.</p>
</dd></dl>
<dl class="c function">
<dt class="sig sig-object c" id="c.pgSound_New">
<span class="n"><span class="pre">PyObject</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">pgSound_New</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">Mix_Chunk</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">chunk</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.pgSound_New" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>Return a new <a class="reference internal" href="../ref/mixer.html#pygame.mixer.Sound" title="pygame.mixer.Sound"><code class="xref py py-class docutils literal notranslate"><span class="pre">pygame.mixer.Sound</span></code></a> instance for the SDL mixer chunk <em>chunk</em>.
On failure, raise a Python exception and return <code class="docutils literal notranslate"><span class="pre">NULL</span></code>.</p>
</dd></dl>
<dl class="c function">
<dt class="sig sig-object c" id="c.pgSound_Check">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pgSound_Check</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">PyObject</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">obj</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.pgSound_Check" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>Return true if <em>obj</em> is an instance of type <a class="reference internal" href="#c.pgSound_Type" title="pgSound_Type"><code class="xref c c-data docutils literal notranslate"><span class="pre">pgSound_Type</span></code></a>,
but not a <a class="reference internal" href="#c.pgSound_Type" title="pgSound_Type"><code class="xref c c-data docutils literal notranslate"><span class="pre">pgSound_Type</span></code></a> subclass instance.
A macro.</p>
</dd></dl>
<dl class="c function">
<dt class="sig sig-object c" id="c.pgSound_AsChunk">
<span class="n"><span class="pre">Mix_Chunk</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">pgSound_AsChunk</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">PyObject</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.pgSound_AsChunk" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>Return the SDL <code class="xref c c-type docutils literal notranslate"><span class="pre">Mix_Chunk</span></code> struct associated with the
<a class="reference internal" href="#c.pgSound_Type" title="pgSound_Type"><code class="xref c c-data docutils literal notranslate"><span class="pre">pgSound_Type</span></code></a> instance <em>x</em>.
A macro that does no <code class="docutils literal notranslate"><span class="pre">NULL</span></code> or Python type check on <em>x</em>.</p>
</dd></dl>
<dl class="c type">
<dt class="sig sig-object c" id="c.pgChannelObject">
<span class="k"><span class="pre">type</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pgChannelObject</span></span></span><a class="headerlink" href="#c.pgChannelObject" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>The <a class="reference internal" href="../ref/mixer.html#pygame.mixer.Channel" title="pygame.mixer.Channel"><code class="xref py py-class docutils literal notranslate"><span class="pre">pygame.mixer.Channel</span></code></a> instance C structure.</p>
</dd></dl>
<dl class="c var">
<dt class="sig sig-object c" id="c.pgChannel_Type">
<span class="n"><span class="pre">PyTypeObject</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">pgChannel_Type</span></span></span><a class="headerlink" href="#c.pgChannel_Type" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>The <a class="reference internal" href="../ref/mixer.html#pygame.mixer.Channel" title="pygame.mixer.Channel"><code class="xref py py-class docutils literal notranslate"><span class="pre">pygame.mixer.Channel</span></code></a> Python type.</p>
</dd></dl>
<dl class="c function">
<dt class="sig sig-object c" id="c.pgChannel_New">
<span class="n"><span class="pre">PyObject</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">pgChannel_New</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n"><span class="pre">channelnum</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.pgChannel_New" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>Return a new <a class="reference internal" href="../ref/mixer.html#pygame.mixer.Channel" title="pygame.mixer.Channel"><code class="xref py py-class docutils literal notranslate"><span class="pre">pygame.mixer.Channel</span></code></a> instance for the SDL mixer
channel <em>channelnum</em>.
On failure, raise a Python exception and return <code class="docutils literal notranslate"><span class="pre">NULL</span></code>.</p>
</dd></dl>
<dl class="c function">
<dt class="sig sig-object c" id="c.pgChannel_Check">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pgChannel_Check</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">PyObject</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">obj</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.pgChannel_Check" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>Return true if <em>obj</em> is an instance of type <a class="reference internal" href="#c.pgChannel_Type" title="pgChannel_Type"><code class="xref c c-data docutils literal notranslate"><span class="pre">pgChannel_Type</span></code></a>,
but not a <a class="reference internal" href="#c.pgChannel_Type" title="pgChannel_Type"><code class="xref c c-data docutils literal notranslate"><span class="pre">pgChannel_Type</span></code></a> subclass instance.
A macro.</p>
</dd></dl>
<dl class="c function">
<dt class="sig sig-object c" id="c.pgChannel_AsInt">
<span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">pgChannel_AsInt</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">PyObject</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="n"><span class="pre">x</span></span><span class="sig-paren">)</span><a class="headerlink" href="#c.pgChannel_AsInt" title="Permalink to this definition">¶</a><br /></dt>
<dd><p>Return the SDL mixer music channel number associated with <a class="reference internal" href="#c.pgChannel_Type" title="pgChannel_Type"><code class="xref c c-type docutils literal notranslate"><span class="pre">pgChannel_Type</span></code></a> instance <em>x</em>.
A macro that does no <code class="docutils literal notranslate"><span class="pre">NULL</span></code> or Python type check on <em>x</em>.</p>
</dd></dl>
</section>
</section>
<br /><br />
<hr />
<a href="https://github.com/pygame/pygame/edit/main/docs/reST/c_api/mixer.rst" rel="nofollow">Edit on GitHub</a>
<div class="clearer"></div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="rect.html" title="Class Rect API exported by pygame.rect"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="freetype.html" title="API exported by pygame._freetype"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pygame v2.1.2 documentation</a> »</li>
<li class="nav-item nav-item-1"><a href="../c_api.html" accesskey="U">pygame C API</a> »</li>
<li class="nav-item nav-item-this"><a href="">API exported by pygame.mixer</a></li>
<script type="text/javascript" src="https://www.pygame.org/comment/jquery.plugin.docscomments.js"></script>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2000-2021, pygame developers.
</div>
</body>
</html>
|