<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>[A4.4.2] No sound at all (continue)</title>
		<link>http://www.allegro.cc/forums/view/609799</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 30 Mar 2012 08:11:43 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So, continues from <a href="http://www.allegro.cc/forums/thread/609089">this thread</a>.</p><p>[edit]<br />I have access to an older Ubuntu (8.04 LTS) so I tried it and it has sound using Allegro 4.4.2, so may be it&#39;s a problem about Ubuntu and/or sound drivers.</p><p><a href="http://opensnc.sourceforge.net/forum/viewtopic.php?id=100">In this forum</a> they say it&#39;s a problem with Pulseaudio, but I&#39;ve tried some of these solutions but it doesn&#39;t fix it and or they&#39;re not compatible (I&#39;m using Ubuntu 11.10 and they&#39;re talking about 8.10).</p><p><a href="http://www.allegro.cc/forums/thread/600325">I&#39;ve found also this thread</a> where Thomas Fjellstrom says:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Because pulseaudio developers thought it was a good idea to take over the default ALSA devices. It completely breaks many valid ALSA programs.</p></div></div><p>
[/edit]</p><p>Edgar Reynaldo suggested to do a diff between 4.4.1.1 and 4.4.2, since 4.4.1.1 does work. I did it and I&#39;ve found some interesting changes mostly in CMakeList.txt:</p><pre class="terminal scroll">$ diff allegro-4.4.1.1/CMakeLists.txt allegro-4.4.2/CMakeLists.txt 

  (...)
381a403
&gt; set(PLATFORM_LIBS_MODULES)      # only link with these if modules enabled
384a407,411
&gt; option(WANT_OSS &quot;Build OSS support&quot; on)
&gt; option(WANT_ALSA &quot;Build ALSA support&quot; on)
&gt; option(WANT_JACK &quot;Build JACK support&quot; on)
&gt; option(WANT_SGIAUDIO &quot;Build SGI audio support&quot; on)
&gt; 
394,419c421,462
&lt;     include(AllegroFindOSS)
&lt;     if(OSS_FOUND)
&lt;         set(ALLEGRO_WITH_OSSDIGI 1)
&lt;         set(ALLEGRO_WITH_OSSMIDI 1)
&lt;         include_directories(SYSTEM ${OSS_INCLUDE_DIR})
&lt;     endif(OSS_FOUND)
&lt; 
&lt;     pkg_check_modules(ALSA alsa)
&lt;     if(ALSA_FOUND)
&lt;         # ALSA 0.5 is beyond obsolete.
&lt;         set(ALLEGRO_ALSA_VERSION 9)
&lt;         set(ALLEGRO_WITH_ALSADIGI 1)
&lt;         set(ALLEGRO_WITH_ALSAMIDI 1)
&lt;         include_directories(SYSTEM ${ALSA_INCLUDE_DIRS})
&lt;         list(APPEND PLATFORM_LIBS_NON_MODULES ${ALSA_LIBRARIES})
&lt;         add_our_module(alleg-alsadigi src/unix/alsa9.c ${ALSA_LIBRARIES})
&lt;         add_our_module(alleg-alsamidi src/unix/alsamidi.c ${ALSA_LIBRARIES})
&lt;     endif(ALSA_FOUND)
&lt; 
&lt;     pkg_check_modules(JACK jack)
&lt;     if(JACK_FOUND)
&lt;         set(ALLEGRO_WITH_JACKDIGI 1)
&lt;         include_directories(SYSTEM ${JACK_INCLUDE_DIRS})
&lt;         list(APPEND PLATFORM_LIBS_NON_MODULES ${JACK_LIBRARIES})
&lt;         add_our_module(alleg-jack src/unix/jack.c ${JACK_LIBRARIES})
&lt;     endif(JACK_FOUND)
---
&gt;     find_library(DLOPEN_LIBRARY dl)
&gt;     mark_as_advanced(DLOPEN_LIBRARY)
&gt;     if(DLOPEN_LIBRARY)
&gt;         list(APPEND PLATFORM_LIBS_MODULES ${DLOPEN_LIBRARY})
&gt;     endif()
&gt; 
&gt;     if(ALLEGRO_HAVE_POSIX_MONOTONIC_CLOCK)
&gt;         list(APPEND PLATFORM_LIBS ${RT_LIBRARY})
&gt;     endif(ALLEGRO_HAVE_POSIX_MONOTONIC_CLOCK)
&gt; 
&gt;     if(WANT_OSS)
&gt;         include(AllegroFindOSS)
&gt;         if(OSS_FOUND)
&gt;             set(ALLEGRO_WITH_OSSDIGI 1)
&gt;             set(ALLEGRO_WITH_OSSMIDI 1)
&gt;             include_directories(SYSTEM ${OSS_INCLUDE_DIR})
&gt;         endif(OSS_FOUND)
&gt;     endif(WANT_OSS)
&gt; 
&gt;     if(WANT_ALSA)
&gt;         pkg_check_modules(ALSA alsa)
&gt;         if(ALSA_FOUND)
&gt;             # ALSA 0.5 is beyond obsolete.
&gt;             set(ALLEGRO_ALSA_VERSION 9)
&gt;             set(ALLEGRO_WITH_ALSADIGI 1)
&gt;             set(ALLEGRO_WITH_ALSAMIDI 1)
&gt;             include_directories(SYSTEM ${ALSA_INCLUDE_DIRS})
&gt;             list(APPEND PLATFORM_LIBS_NON_MODULES ${ALSA_LIBRARIES})
&gt;             add_our_module(alleg-alsadigi src/unix/alsa9.c ${ALSA_LIBRARIES})
&gt;             add_our_module(alleg-alsamidi src/unix/alsamidi.c ${ALSA_LIBRARIES})
&gt;         endif(ALSA_FOUND)
&gt;     endif(WANT_ALSA)
&gt; 
&gt;     if(WANT_JACK)
&gt;         pkg_check_modules(JACK jack)
&gt;         if(JACK_FOUND)
&gt;             set(ALLEGRO_WITH_JACKDIGI 1)
&gt;             include_directories(SYSTEM ${JACK_INCLUDE_DIRS})
&gt;             list(APPEND PLATFORM_LIBS_NON_MODULES ${JACK_LIBRARIES})
&gt;             add_our_module(alleg-jack src/unix/jack.c ${JACK_LIBRARIES})
&gt;         endif(JACK_FOUND)
&gt;     endif(WANT_JACK)
422,427c465,472
&lt;     check_library_exists(audio alOpenPort &quot;&quot; SGIAUDIO_FOUND)
&lt;     if(SGIAUDIO_FOUND)
&lt;         set(ALLEGRO_WITH_SGIALDIGI 1)
&lt;         list(APPEND PLATFORM_LIBS_NON_MODULES audio)
&lt;         add_our_module(alleg-sgialdigi src/unix/sgial.c audio)
&lt;     endif(SGIAUDIO_FOUND)
---
&gt;     if(WANT_SGIAUDIO)
&gt;         check_library_exists(audio alOpenPort &quot;&quot; SGIAUDIO_FOUND)
&gt;         if(SGIAUDIO_FOUND)
&gt;             set(ALLEGRO_WITH_SGIALDIGI 1)
&gt;             list(APPEND PLATFORM_LIBS_NON_MODULES audio)
&gt;             add_our_module(alleg-sgialdigi src/unix/sgial.c audio)
&gt;         endif(SGIAUDIO_FOUND)
&gt;     endif(WANT_SGIAUDIO)


  (...)</pre><p> There are more differences but I&#39;ve put here only sound related.</p><p>About other code, I&#39;ve found only ALSA-MIDI related changes:
</p><pre class="terminal scroll">$ diff allegro-4.4.1.1/src/unix/alsamidi.c allegro-4.4.2/src/unix/alsamidi.c 
147c147
&lt;    int ret = -1, err;
---
&gt;    int ret, err;
184,185c184,186
&lt; 
&lt;       ret = 0;
---
&gt;       else {
&gt;          ret = 0;
&gt;       }</pre><p>

There are more changes but I&#39;m not sure if they affect to sound.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Niunio)</author>
		<pubDate>Wed, 21 Mar 2012 02:34:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m using Allegro 4.4.2 in Ubuntu 11.10 and sound works just fine. Here&#39;s the thing. The first time I compiled Allegro I had the same problem (no Sound). The problem was I was missing the &quot;optional&quot; library related to sound. Go through the optional libraries they list on the page about compiling allegro, install everything, and try again.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Necrolin)</author>
		<pubDate>Thu, 22 Mar 2012 06:10:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What &quot;optional&quot; library is it? <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Niunio)</author>
		<pubDate>Wed, 28 Mar 2012 22:45:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Maybe he&#39;s referring to <a href="http://wiki.allegro.cc/index.php?title=Build/X11">this page</a>?</p><p>So, try <br />libasound2-dev (to compile in Alsa support)<br />libjack-dev (to compile in Jack support) </p><p>and if there are more, you should be able to find them in CMakeLists.txt by searching for WANT_*.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 30 Mar 2012 07:58:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Niunio,</p><p>I think we&#39;re just out of luck. Wherever PulseAudio is available, Allegro 4 games may simply not play any sounds at all. One can try using wrappers such as <i>aoss</i> or <i>padsp</i>, but these may not work either. It&#39;s far too complicated for the end users.</p><p>I simply gave up on this issue and rewrote my audio routines using OpenAL and ALURE instead. If anyone is still struggling with this, please feel free to take a look at my code (attached). No need to use any wrappers anymore. It just works. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (alemart)</author>
		<pubDate>Fri, 30 Mar 2012 08:11:43 +0000</pubDate>
	</item>
</rss>
