<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Wave-Sound einbinden]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich wollte in mein Programm einen Wave-Sound einbinden...<br />
hab folgenden Code gefunden:</p>
<p>// play a wave file sound using the winmm library<br />
// For DevCpp add the library libwinmm.a to linker via<br />
// Project/Project Options/Parameters/Add Library<br />
// remember this is a console program!</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;windows.h&gt; // for PlaySound()</p>
<p>#define SND_FILENAME 0x20000<br />
#define SND_LOOP 8<br />
#define SND_ASYNC 1</p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
// play sound as loop (remove SND_LOOP for one time play)<br />
// file boing.wav has be in the working directory<br />
PlaySound(&quot;boing.wav&quot;,NULL,SND_FILENAME|SND_LOOP|SND_ASYNC);</p>
<p>cin.get(); // wait<br />
return 0;<br />
}</p>
<p>Funktioniert aber nicht... Weiß jemand, wie ich diese Library verlinken kann?<br />
Benutze CodeBlocks und weiß nicht, wie ich libwinmm.a anbinden soll an das Programm, beziehungsweise nicht einmal wo diese Datei sein soll... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Jemand eine Idee, oder anderen Vorschlag um den Sound ins Programm zu bekommen?<br />
Vielen Dank schon einmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/243190/wave-sound-einbinden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 20 Sep 2026 04:48:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/243190.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Jun 2009 21:35:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wave-Sound einbinden on Sat, 13 Jun 2009 21:35:31 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich wollte in mein Programm einen Wave-Sound einbinden...<br />
hab folgenden Code gefunden:</p>
<p>// play a wave file sound using the winmm library<br />
// For DevCpp add the library libwinmm.a to linker via<br />
// Project/Project Options/Parameters/Add Library<br />
// remember this is a console program!</p>
<p>#include &lt;iostream&gt;<br />
#include &lt;windows.h&gt; // for PlaySound()</p>
<p>#define SND_FILENAME 0x20000<br />
#define SND_LOOP 8<br />
#define SND_ASYNC 1</p>
<p>using namespace std;</p>
<p>int main()<br />
{<br />
// play sound as loop (remove SND_LOOP for one time play)<br />
// file boing.wav has be in the working directory<br />
PlaySound(&quot;boing.wav&quot;,NULL,SND_FILENAME|SND_LOOP|SND_ASYNC);</p>
<p>cin.get(); // wait<br />
return 0;<br />
}</p>
<p>Funktioniert aber nicht... Weiß jemand, wie ich diese Library verlinken kann?<br />
Benutze CodeBlocks und weiß nicht, wie ich libwinmm.a anbinden soll an das Programm, beziehungsweise nicht einmal wo diese Datei sein soll... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Jemand eine Idee, oder anderen Vorschlag um den Sound ins Programm zu bekommen?<br />
Vielen Dank schon einmal!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1726169</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1726169</guid><dc:creator><![CDATA[Barcelona]]></dc:creator><pubDate>Sat, 13 Jun 2009 21:35:31 GMT</pubDate></item><item><title><![CDATA[Reply to Wave-Sound einbinden on Sat, 13 Jun 2009 22:29:39 GMT]]></title><description><![CDATA[<p>[0] &quot;Funktioniert nicht&quot; -&gt; sehr schlechte Beschreibung eines Fehlers.<br />
[1] PlaySound ist WinAPI, also ein paar Stockwerke höher.<br />
[2] Kompiler/Linker/IDE Probleme gehört ins Kompilerforum, also ein paar Stockwerke tiefer.<br />
[3] Suchmaschinen benutzen, für das Inet, für Foren. Solche Fragen werden immer wieder gestellt.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1726179</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1726179</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Sat, 13 Jun 2009 22:29:39 GMT</pubDate></item><item><title><![CDATA[Reply to Wave-Sound einbinden on Sat, 13 Jun 2009 23:15:12 GMT]]></title><description><![CDATA[<p>Barcelona schrieb:</p>
<blockquote>
<p>Weiß jemand, wie ich diese Library verlinken kann?</p>
</blockquote>
<p>Du verwendest wohl MinGW als Compiler, daher befindet sich Datei im lib-Unterverzeichnis des Installationspfades von MinGW.</p>
<p>Einbinden kannst du sie über</p>
<p><strong>Project</strong> -&gt; <strong>Build options ...</strong> -&gt; <strong>Linker settings</strong><br />
Dann auf <strong>Add</strong> klicken und in das aufgehende Fenster <strong>libwinmm</strong> eintragen. Auf <strong>OK</strong> klicken und in das Fenster <strong>Link libraries</strong> sehen, dort müsste die Bibliothek jetzt aufgeführt sein, dann nochmal auf <strong>OK</strong> klicken und Projekt neu erstellen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1726188</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1726188</guid><dc:creator><![CDATA[El Real Madrid]]></dc:creator><pubDate>Sat, 13 Jun 2009 23:15:12 GMT</pubDate></item><item><title><![CDATA[Reply to Wave-Sound einbinden on Sun, 14 Jun 2009 08:58:02 GMT]]></title><description><![CDATA[<p>El Real Madrid schrieb:</p>
<blockquote>
<p>Barcelona schrieb:</p>
<blockquote>
<p>Weiß jemand, wie ich diese Library verlinken kann?</p>
</blockquote>
<p>Du verwendest wohl MinGW als Compiler, daher befindet sich Datei im lib-Unterverzeichnis des Installationspfades von MinGW.</p>
<p>Einbinden kannst du sie über</p>
<p><strong>Project</strong> -&gt; <strong>Build options ...</strong> -&gt; <strong>Linker settings</strong><br />
Dann auf <strong>Add</strong> klicken und in das aufgehende Fenster <strong>libwinmm</strong> eintragen. Auf <strong>OK</strong> klicken und in das Fenster <strong>Link libraries</strong> sehen, dort müsste die Bibliothek jetzt aufgeführt sein, dann nochmal auf <strong>OK</strong> klicken und Projekt neu erstellen.</p>
</blockquote>
<p>Sehr gut, genau das war meine Frage und die Lösung klappt auch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> ... vielen Dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1726246</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1726246</guid><dc:creator><![CDATA[Barcelona]]></dc:creator><pubDate>Sun, 14 Jun 2009 08:58:02 GMT</pubDate></item></channel></rss>