<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Video files in Allgro?</title>
		<link>http://www.allegro.cc/forums/view/543339</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 27 Nov 2005 09:06:48 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is there a way to play a video file ( like .avi ) in Allegro?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Tue, 08 Nov 2005 06:39:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yes, several. <a href="http://kcat.strangesoft.net/">Apeg</a> is the one that comes to my mind.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Tue, 08 Nov 2005 06:42:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Note that APEG won&#39;t play AVI files. It will play MPEG-1 and Ogg Vorbis/Theora files, though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Tue, 08 Nov 2005 07:25:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ogg? Can it play music files too?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Tue, 08 Nov 2005 14:03:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you&#39;re making a freeware / opensource game you could use Fmod vor music and sound effects
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ariesnl)</author>
		<pubDate>Tue, 08 Nov 2005 14:05:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am making a small game, just for my friends. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>And I would like to play a video and some musics. I am using .wav files, but they are too big. Is there a way to use .gif files too?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Tue, 08 Nov 2005 14:10:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>not that I know..</p><p>wav is good for soundeffects  for other things ude MP3 or trackermusic ( mod s3m etc)  midi sounds bad
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ariesnl)</author>
		<pubDate>Tue, 08 Nov 2005 14:12:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>APEG can play Ogg Vorbis audio/music too, yes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Tue, 08 Nov 2005 15:10:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And I would like to play a video and some musics. I am using .wav files, but they are too big. Is there a way to use .gif files too?
</p></div></div><p>
You do realize that .gif files are images (albeit with limited animation possibilities), not audio or video files?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Tue, 08 Nov 2005 15:21:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You do realize that .gif files are images (albeit with limited animation possibilities), not audio or video files?
</p></div></div><p>

Sure. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /><br />But I would like to use .gif to save some space. Is there a way to do this?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 09 Nov 2005 04:08:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There is a png library that you can use (which is much more flexible than gif, and about the same size) if you don&#39;t need animation, gif limits you to 256 colors anyway, why not use the built in pcx? (also loading gif animations would be a lot harder than putting a list of images into a single pcx file, the only limits that I know of with pcx is that allegro will only load 8 bit pcx files, no loss compared to gif tho) also pcx are RLE encoded so you see a huge compression compared to bmp. (png is still smaller)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Wed, 09 Nov 2005 04:17:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
the only limits that I know of with pcx is that allegro will only load 8 bit pcx files
</p></div></div><p>
Eh?</p><p>PCX is a bad choice for true colour image files though... the RLE compression doesn&#39;t help as much as with 8 bit images. You also need to be careful about selecting what palette entries you use the most for a PCX file, otherwise you&#39;ll end up with a much larger file (I oncereduced a PCX file more than 50% in size by reshuffling the palette).</p><p>There is also a trick (that is seldom if ever used) that makes it possible to have more than 256 colours in one GIF image. I lost the link though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 09 Nov 2005 04:24:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So.... I tried to download the Apeg. But I found only the code, so needs to compile.... but as always.... ERRORS:<br />____________________________________________________</p><p> C:\Hangar6\apeg\main.cpp In function `void setenv(const char*, const char*, int)&#39;: </p><p>38 C:\Hangar6\apeg\main.cpp `_putenv&#39; undeclared (first use this function) </p><p> C:\Hangar6\apeg\main.cpp In function `int check_obj_deps(char*, time_t)&#39;: </p><p>143 C:\Hangar6\apeg\main.cpp invalid conversion from `void*&#39; to `char*&#39; </p><p>__________________________________________________</p><p>Missing Library?<br />Is there a place where I can download the compiled version?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 09 Nov 2005 05:25:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It looks like you&#39;re trying to compile cbuild.c as a C++ file, which won&#39;t work. Just use the makefile, it&#39;ll compile cbuild for you then you can run cbuild to build the library. You&#39;ll also need libogg, libvorbis, and libtheora to use Ogg media.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 09 Nov 2005 06:42:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How to use the makefile?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 09 Nov 2005 06:56:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Run &#39;make&#39; or &#39;mingw32-make&#39;.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 09 Nov 2005 07:17:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I copied &quot;make.exe&quot; to the same folder where the &quot;makefile&quot; is. I ran the &quot;make.exe&quot; but it complains: &quot;Couldn&#39;t find the file.&quot;</p><p>I tried with the &quot;mingw32-make.exe&quot;, but got the same error.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 10 Nov 2005 04:05:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The name of the makefile isn&#39;t makefile.txt or something, is it?  If you&#39;re using windows then the file display junk might be hiding the extensions.  Right click &quot;makefile&quot; and select properties to see true name.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Thu, 10 Nov 2005 05:59:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There are 2 makefiles: &quot;Makefile&quot; and &quot;Makefile.win&quot;.</p><p>Do I need to use any command with the &quot;make.exe&quot; or just run it?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 10 Nov 2005 06:19:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh, Microsoft stuff...  I&#39;ve never had MS stuff, but I remember seeing a lot of references to &quot;nmake&quot; which I guess is the Microsoft equivalent to make.exe
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Thu, 10 Nov 2005 06:34:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>...I am lost... <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" /></p><p>I downloaded a program called &quot;nmake&quot; for Windowns 2000. But it didn&#39;t work. Is there a &quot;nmake&quot; for XP? ( My Windows is XP )</p><p>And.... isn&#39;t there an easier way to use apeg?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 10 Nov 2005 07:15:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m lost. APEG has only one makefile, called Makefile. The make you run is the same one you used to build Allegro and the Ogg stuff. You don&#39;t need to copy it to APEG&#39;s directory because it should be in your PATH environment variable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Thu, 10 Nov 2005 07:29:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>make will automatically load &quot;makefile.&quot; from the directory you run it from (as in makefile with NO extension) to make anything else you need to supply a file name.</p><p>As KC already said you do NOT need it to be in the same folder; remove it now.</p><p>As for version of windows, make has nothing to do with the version of windows you have, but instead has to do with the version of the compiler it was designed for, nmake is with microsoft&#39;s visual c++, you should use the same make that you built allegro with (or whatever make APEG is compatable with...)</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
PCX is a bad choice for true colour image files though... the RLE compression doesn&#39;t help as much as with 8 bit images.
</p></div></div><p> That&#39;s a really good point.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You also need to be careful about selecting what palette entries you use the most for a PCX file, otherwise you&#39;ll end up with a much larger file (I oncereduced a PCX file more than 50% in size by reshuffling the palette).
</p></div></div><p> Unless you have no runs, or 90% of your colors are above like 240 (or so?) in the pallette this really isn&#39;t an issue; 99% of image conversions should be smaller than bitmaps, and I&#39;ve never encountered one that wouldn&#39;t be, it really seems like you&#39;d have to doctor it that way, or have an extreemly prominant background color as index 255.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You&#39;ll also need libogg, libvorbis, and libtheora to use Ogg media.
</p></div></div><p>One of the reasons that I complain that we don&#39;t have enough built into allegro, if your project uses APEG, now you also have to manually install libogg, libvorbis, libtheora (and any dependencies they have).... and ANYONE who wants to recompile your code not only needs allegro, but also libogg, libvorbis, libtheora (and any dependencies they have), and APEG.... and APEG is not an isolated case for this; there are many other libraries with nighmareish cascading trees of dependencies... <img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" /></p><p>edit: (Also consider, who knows what version of which library a specific library is dependant on? and NO it&#39;s not as simple as just downloading it and running make; first off it&#39;s finding the files to download, which I kid you not for some auxiallary libraries I gave up on... and some simply do not make(current build is broken) or are the wrong version... etc etc, I&#39;ve run into MANY problems of this type before, and it&#39;s not just typing make.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Thu, 10 Nov 2005 11:58:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Unless you have no runs, or 90% of your colors are above like 240 (or so?) in the pallette this really isn&#39;t an issue; 99% of image conversions should be smaller than bitmaps, and I&#39;ve never encountered one that wouldn&#39;t be, it really seems like you&#39;d have to doctor it that way, or have an extreemly prominant background color as index 255.
</p></div></div><p>
It can happen if you have an image with many colours. You won&#39;t get a 100% size increase from that though, mostly a 33%.<br />The image I had that I was refering to did seem that it was specifically tailored to be bad for PCX files - it had 63 colours in it, all of them above 192 (which is the magical number).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
One of the reasons that I complain that we don&#39;t have enough built into allegro
</p></div></div><p>
You&#39;re spoiled by Allegro having so few external dependencies. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /><br />Anyway, we won&#39;t be including all sorts of thirdparty libraries into the Allegro distribution.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 10 Nov 2005 14:23:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
if your project uses APEG, now you also have to manually install libogg, libvorbis, libtheora (and any dependencies they have).... and ANYONE who wants to recompile your code not only needs allegro, but also libogg, libvorbis, libtheora (and any dependencies they have), and APEG...
</p></div></div><p>
Dependancies can be a <span class="cuss"><span>bitch</span></span>, unfortunately. Some pacakge managers can help, by installing the dependancies before the requested package automatically (which is why I&#39;d recommend distros like Gentoo or Sourcemage). Unfortuantely Windows isn&#39;t very well off in this regard, not only by not having a package manager, but also by having a crippling shell. You can use MSYS, which I was able to use to build libogg/libtheora/libvorbis/etc, but that would be yet another dependancy..</p><p>And this is why Allegro doesn&#39;t support PNG or ZIP or any of that stuff built in, or else it&#39;d have the same dependancy issues. Dynamicly loading shared libs would absolve the need for them to be required at compile time (and thusly become a run-time thing), but that will only work on platforms that can use shared libs and would lock your program into needing the shared libs without any easy way of staticlinking them.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Thu, 10 Nov 2005 14:26:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
The image I had that I was refering to did seem that it was specifically tailored to be bad for PCX files - it had 63 colours in it, all of them above 192 (which is the magical number).
</p></div></div><p> I guess that&#39;s kind of my point -- unless your image converting program is mega crazy that should never happen! <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Anyway, we won&#39;t be including all sorts of thirdparty libraries into the Allegro distribution.
</p></div></div><p> Of course not, and you wont be doing what I want either (building that functionality into allegro itself) because that would also be crazy.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Dynamicly loading shared libs would absolve the need for them to be required at compile time (and thusly become a run-time thing)
</p></div></div><p> YOU FREAKING GENIUS! NOW GO AND IMPLIMENT IT!</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
but that will only work on platforms that can use shared libs and would lock your program into needing the shared libs without any easy way of staticlinking them.
</p></div></div><p> are there any besides DOS? I vote drop DOS... on the other hand you could always impliment this as an add-on library (sadly it makes half an ounce of sense, in that you&#39;d only ever have to build one library, and just download .so&#39;s .lib&#39;s .a&#39;s or .dll&#39;s for something, and you could use it right out of the box.)</p><p>It&#39;s 1:45 am, isn&#39;t it? Can you tell? <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>edit:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You&#39;re spoiled by Allegro having so few external dependencies.
</p></div></div><p> Allegro <i>has</i> external dependencies? <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /></p><p>Actually I&#39;m spoiled by the .NET framework/development environments with it&#39;s really tight debugger, and all kinds of autocompletion/intellisense and even autoformatting options! (that work!) <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Thu, 10 Nov 2005 15:50:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Of course not, and you wont be doing what I want either (building that functionality into allegro itself) because that would also be crazy.
</p></div></div><p>
Well, we&#39;re not going to reinvent the wheel if that&#39;s what you mean.<br />But it simply becomes unwieldy to have that many external dependencies, not to mention the sheer size of the download. That&#39;s not saying someone can&#39;t make an Allegro package that contains it all, but we won&#39;t be the ones doing it.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I vote drop DOS...
</p></div></div><p>
We did. Or at least we did unless someone can (and wants to) do the the work required to port the DOS drivers to the new API.</p><p>As for adding functionalty at runtime by dynamic loading of shared libraries, it sounds nifty. We need a good way to report to the user what is and isn&#39;t available at runtime though, so that he or she can respond appropriately.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It&#39;s 1:45 am, isn&#39;t it?
</p></div></div><p>
No, it isn&#39;t. It&#39;s 11.15 am.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Allegro has external dependencies?
</p></div></div><p>
Sure it does. On Windows, it&#39;s limited to the DirectX development headers and standard Win32 libraries; in *NIX it has loads of optional dependencies: X11 with a load of extensions (this is the main dependency), ALSA, aRts, SVGALib, fbdev, pthreads(actually, this is required)...<br />You normally don&#39;t notice that many of these dependencies are there because they&#39;re pretty much installed anyway or, in UNIX, the corresponding driver is simply not build. But the most common problems people run into when compiling Allegro are missing DirectX headers (in Windows) or missing X11 development libraries (in *NIX).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 10 Nov 2005 16:24:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
are there any besides DOS?
</p></div></div><p>I think original Quake used some magic to get something similar to dynamic linking work in dos.<br />[edit]<br />but of course that is not saying that allegro devs should do that too
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Thu, 10 Nov 2005 16:24:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
YOU FREAKING GENIUS! NOW GO AND IMPLIMENT IT!
</p></div></div><p>
It&#39;s not so clear-cut, unfortunately. Theoretically, it would work. But to do so, I&#39;d have to copy out the exposed/used structures and typedefs. This is where undefined exposed structures (or whatever the name is) come in handy, because you&#39;d just have the structure name, and you&#39;d be basically dealing with pointers, while using accessor functions from the lib to get/set the data. The problem with defined exposed structures is if the size or member arrangement ever changes, the ABI instantly breaks and you need to recompile. In this way I hope Allegro&#39;s new API will allow run-time dynamic loading, but that&#39;s neither here nor there for this topic..</p><p>The problem is, and I didn&#39;t think about this &#39;til after the last post, is that libogg, libvorbis, and libtheora aren&#39;t designed to be dynamicly loaded like that. They have exposed structures that you directly access. libogg and libvorbis may be used so much that changing the structures would be devestating to a good number of programs that use the shared lib/dll (and thus should be okay to just copy the structures), but I don&#39;t believe libtheora is at that point yet.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Thu, 10 Nov 2005 17:04:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Well, we&#39;re not going to reinvent the wheel if that&#39;s what you mean.
</p></div></div><p> Right, I pointed out that either end of the stick is either out of allegro&#39;s scope, or just plain crazy.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
We did. Or at least we did unless someone can (and wants to) do the the work required to port the DOS drivers to the new API.
</p></div></div><p> Are you talking allegro 5? Tight.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
No, it isn&#39;t. It&#39;s 11.15 am.
</p></div></div><p> Obviously you&#39;re not in Seattle right now, are you? And it&#39;s 3:11 AM now, so there.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Sure it does.
</p></div></div><p> Never thought of it like that...</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It&#39;s not so clear-cut, unfortunately. Theoretically, it would work.
</p></div></div><p> Don&#39;t take it personal KC, I was j/k.  Altho if the person to write such a library would come up with a standard struct definition protocol, and the dll&#39;s to be plugged into this library all supported that struct definition protocol (possibly supplying an emulation/translation layer), and it was FAST.... well then.  But also what if santa clause could fly around the world 200 bazillion times a second, and I were able to do well on my japanese test tomorrow.... today... crap time for bed... goodnight.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Thu, 10 Nov 2005 17:19:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Are you talking allegro 5? Tight.
</p></div></div><p>I think he meant 4.3
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Thu, 10 Nov 2005 17:56:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Now I am really lost.... <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>What do I need to do to use APEG?<br />I have the &quot;make.exe&quot; that came with Dev-C++ ( I think ). Should I use a shell to run it? What should I type?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Fri, 11 Nov 2005 03:03:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I think he meant 4.3
</p></div></div><p> There&#39;s an API change in 4.3?</p><p>Andrés: Sorry for taking your thread so off-topic, I&#39;m a troll <img src="http://www.allegro.cc/forums/smileys/sad.gif" alt=":(" />! Anyway, does APEG come with a readme.txt or buildme.txt or something?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Fri, 11 Nov 2005 05:41:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Andrés: Sorry for taking your thread so off-topic, I&#39;m a troll ! Anyway, does APEG come with a readme.txt or buildme.txt or something?
</p></div></div><p>

No problem. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>Yes, it have &quot;apeg.txt&quot;.<br />But it says:</p><p><i>&quot;To build APEG, first run make to compile a CBuild executable.</i><i>If you have an sh-compatible shell, you can also run the cbuild.c</i><i>source file directly, instead of creating the executable. You can</i><i>check &#39;cbuild--help&#39; for a list of available options. Now, run</i><i>cbuild and let it do its thing.&quot;</i></p><p>But how to run &quot;make&quot;?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Fri, 11 Nov 2005 06:12:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
But how to run &quot;make&quot;?
</p></div></div><p>
The same way you did when you built Allegro and the Ogg/Vorbis/Theora libs. Open a command shell, switch to the directory APEG is in, and run make. As long as it&#39;s in your path , it&#39;ll run from there.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 11 Nov 2005 07:54:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you want, you can just download the binaries <a href="http://qubsoft.siamey.com/downloads/APEG.rar">here</a>. I compiled it a while ago and I had some problems with it too. Hope this helps.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jonny Cook)</author>
		<pubDate>Fri, 11 Nov 2005 08:08:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No. Someone not capable of running make does not deserve binaries. Kidding... but I do have a point, don&#39;t I?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Fri, 11 Nov 2005 14:39:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Everyone should be accessible to it.  Even Christopher Reeve.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Randal Stackpoole)</author>
		<pubDate>Fri, 11 Nov 2005 15:51:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
There&#39;s an API change in 4.3?
</p></div></div><p>
4.3 is the `gradually change Allegro 4.2&#39;s API into the new Allegro5 API&#39; branch. So yes, there is.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 11 Nov 2005 15:54:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I tried to run &quot;make&quot; again, but still got errors.<br />So I downloaded the binaries. (Huge thanks for them! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />)</p><p>But &quot;apeg.txt&quot; says about an &quot;CBuild executable&quot;, where is it?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Fri, 11 Nov 2005 23:37:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Since you have the binaries you probably don&#39;t need it; it sounds like you run make to get cbuild, and you run cbuild to get the binaries.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Sat, 12 Nov 2005 03:01:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>But I need to include &quot;&lt;apeg.h&gt;&quot;, and I have no &quot;apeg.h&quot;. <img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sat, 12 Nov 2005 04:18:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yes. <br />&quot;apeg.h&quot; means that apeg.h is in the same directory as the source.<br />&lt;apeg.h&gt; means that it would be in your compiler&#39;s include directory.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Everyone should be accessible to it. Even Christopher Reeve.
</p></div></div><p>You do know he&#39;s been dead for quite some time, right? <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Derezo)</author>
		<pubDate>Sat, 12 Nov 2005 04:57:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Right, so the binaries would be JUST the part that is compiled.  Apeg.h should be included in the source distro, as it wouldn&#39;t be modified at all during the build process, you should just manually copy it to your compiler&#39;s include directory.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Sat, 12 Nov 2005 06:41:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Yes. <br />&quot;apeg.h&quot; means that apeg.h is in the same directory as the source.<br />&lt;apeg.h&gt; means that it would be in your compiler&#39;s include directory.
</p></div></div><p>

Sorry, I meant: I don&#39;t have the apeg.h file. And the apeg.txt says that I will need it to use APEG.</p><p>-------------------------------------<br />EDIT:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Right, so the binaries would be JUST the part that is compiled. Apeg.h should be included in the source distro, as it wouldn&#39;t be modified at all during the build process, you should just manually copy it to your compiler&#39;s include directory.
</p></div></div><p>

I'm dumb!, I didn&#39;t see that. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>Thanks to everyone! I will try it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sat, 12 Nov 2005 06:41:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sorry if I wasn&#39;t clear, it should be in the source package, somewhere.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Sat, 12 Nov 2005 06:43:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m dumb! I didn&#39;t see that.
</p></div></div><p>

<img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>COOL!</p><p>I typed: L o l , I didn&#39;t see that.</p><p>And it shows: I&#39;m dumb! I didn&#39;t see that.</p><p><img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>_____________________________________________</p><p>EDIT:</p><p>I copied the apeg.h to the include folder. Changed the linkers to:</p><p>libapeg.a<br />libogg.a<br />libtheora.a<br />libvorbisenc.a<br />libvorbis.a<br />-lalleg</p><p>And I am trying to compile one of the examples (exsimple.c) that comes with APEG. But I am having many of these errors:</p><p>  [Linker error] undefined reference to `pack_fopen_vtable&#39; </p><p>Did I do something wrong about the linkers?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sat, 12 Nov 2005 06:54:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
[Linker error] undefined reference to `pack_fopen_vtable&#39;
</p></div></div><p>
Do you have Allegro 4.2?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Sat, 12 Nov 2005 07:32:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>No.... I have Version 4.0.3
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sat, 12 Nov 2005 07:45:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You need 4.2 (or a late 4.1 WIP, but there&#39;s no reason for that).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Sat, 12 Nov 2005 07:52:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I downloaded &quot;all420.zip&quot; and unzipped it in my allegro folder, overwriting all. But still get the same errors.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sat, 12 Nov 2005 08:16:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Andréas Martano said:</div><div class="quote"><p>

I downloaded &quot;all420.zip&quot; and unzipped it in my allegro folder, overwriting all. But still get the same errors.
</p></div></div><p>

Did you runned &quot;fix&quot;, &quot;make&quot; and &quot;make install&quot;?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Sat, 12 Nov 2005 13:17:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Just grab a binary package from the files section of Allegro.cc
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 12 Nov 2005 14:46:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Also, don&#39;t just overwrite, delete the original folder, then uncompress the new. Otherwise things will screw up.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 12 Nov 2005 14:55:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I always get an error when trying to run make.</p><p>But the binaries in the download page are from 4.0.3</p><p>....too late already overwrote them. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>--------------------------------------------------</p><p>Found them! Found the binaries for 4.2 .<br />Thanks. I am downloading them.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sat, 12 Nov 2005 16:49:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I always get an error when trying to run make.
</p></div></div><p>
What&#39;s the error message and how do you run make?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
....too late already overwrote them.
</p></div></div><p>
Not a problem. Just delete the directory tree and unpack a clean package.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 12 Nov 2005 18:22:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
What&#39;s the error message and how do you run make?
</p></div></div><p>

I open a shell, go to the makefile folder and type: makefile<br />Then it says: Don&#39;t recognize the file.<br />I tried to type: run makefile<br />Then it says: Don&#39;t recognize &#39;run&#39;.</p><p>After I tried to change the name of the makefile to &quot;makefile.exe&quot;. And used the shell again. With the APEG makefile it complains about a fatal error. With the Allegro makefile it doesn&#39;t complain, but do nothing (at least I saw no change).</p><p>----------------------------------------------</p><p>I copied Allegro 4.2 to the right folders and I am getting these errors now:</p><p>  [Linker error] undefined reference to `oggpackB_readinit&#39; </p><p>What is the mean of &quot;Linker error&quot; is it about the includes, linker (-lalleg), or what?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sat, 12 Nov 2005 19:06:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Do not rename Makefile to Makefile.exe!!</p><p>Instead you have to run an existing make.exe or mingw32-make.exe in the directory where the Makefile is located.</p><p>Example:</p><p>Your mingw32-make.exe is in C:\MINGW\BIN. Your Makefile is in C:\ALLEGRO.</p><p>You have to open a command line window and type:</p><p>CD C:\ALLEGRO<br />C:\MINGW\BIN\mingw32-make.exe
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Faerber)</author>
		<pubDate>Sat, 12 Nov 2005 19:14:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I open a shell, go to the makefile folder and type: makefile<br />Then it says: Don&#39;t recognize the file.<br />I tried to type: run makefile<br />Then it says: Don&#39;t recognize &#39;run&#39;.
</p></div></div><p>
Ok, have you read the instructions in allegro/doc/build/ (pick the one for your compiler, probably MinGW or MSVC)?<br />How you should run make and install Allegro is explained there (the short answer is what Michael said, but you may want to read the instructions anyway).<br />You won&#39;t need this if you already installed a binary package, but it wouldbe good to read it at least once anyway.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 12 Nov 2005 19:23:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for the explanation. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>But now I am having only this error when compiling the example code:</p><p> C:\Dev-Cpp\Meus\ABCD\Makefile.win [Build Error]  [Testes.exe] Error 1 </p><p>If I delete the:</p><p>libapeg.a<br />libogg.a<br />libtheora.a<br />libvorbis.a<br />libvorbisenc.a</p><p>from the linker, the error disappears. But I get &quot;linker errors&quot;.</p><p>-----------------------------------------</p><p>Now I copied the APEG binaries to the same folder of the test project.<br />And I am getting this kind of errors:</p><p>  [Linker error] undefined reference to `oggpackB_read&#39; </p><p>I am not even using the command: oggpackB_read
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sun, 13 Nov 2005 18:50:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You should probably show us the actual error. Saying that removing the libs from the linker removes the errors but gives you errors doesn&#39;t make much sense.</p><p>PS. you normally use -lname to specify a library (libname.a) on the command line.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 14 Nov 2005 06:39:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sorry to saying that in this form, but its looks like that you fuked up your compiler completely deleting, renaming and replacing files when you shouldn&#39;t do that. And fuked allegro too.</p><p>I recommed to delete your compiler and your allegro and reinstall they from the start...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 14 Nov 2005 09:03:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I tried to put a &quot;-&quot; before the &quot;libapeg.a&quot;, but got an error saying that couldn&#39;t find: -libapeg.a</p><p>----</p><p>The problem is:</p><p>If I have:</p><p>libapeg.a<br />libogg.a<br />libtheora.a<br />libvorbis.a<br />libvorbisenc.a<br />-lalleg</p><p>in the linkers, I get many errors of this type:</p><p>  [Linker error] undefined reference to `oggpackB_readinit&#39; <br />  [Linker error] undefined reference to `oggpackB_read&#39; <br />  [Linker error] undefined reference to `oggpackB_read&#39; <br />  more undefined references to `oggpackB_read&#39; follow </p><p>-</p><p>If I put only:</p><p>-lalleg</p><p>int the linker, I get only these errors:</p><p> C:\Dev-Cpp\Meus\ABCD\testes.o In function `Z13_mangled_mainiPPc&#39;: <br />  [Linker error] undefined reference to `apeg_play_mpg&#39; <br />  [Linker error] undefined reference to `apeg_error&#39; <br /> C:\Dev-Cpp\Meus\ABCD\testes.o ld returned 1 exit status <br /> C:\Dev-Cpp\Meus\ABCD\Makefile.win [Build Error]  [Testes.exe] Error 1 </p><p>-</p><p>The code is:</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;string.h&gt;</span></td></tr><tr><td class="number">2</td><td><span class="p">#include &lt;stdio.h&gt;</span></td></tr><tr><td class="number">3</td><td>&#160;</td></tr><tr><td class="number">4</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">5</td><td><span class="p">#include "apeg.h"</span></td></tr><tr><td class="number">6</td><td>&#160;</td></tr><tr><td class="number">7</td><td>&#160;</td></tr><tr><td class="number">8</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span> <span class="k3">*</span>argv<span class="k2">[</span><span class="k2">]</span><span class="k2">)</span></td></tr><tr><td class="number">9</td><td><span class="k2">{</span></td></tr><tr><td class="number">10</td><td>  <span class="k1">int</span> ret, depth<span class="k2">;</span></td></tr><tr><td class="number">11</td><td>&#160;</td></tr><tr><td class="number">12</td><td>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span></td></tr><tr><td class="number">13</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">14</td><td>    <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>stderr, <span class="s">"Error initializing Allegro: %s\n"</span>, <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td>    <span class="k1">return</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">16</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">17</td><td>&#160;</td></tr><tr><td class="number">18</td><td>  <span class="c">// Check to make sure we have enough cmd-line args</span></td></tr><tr><td class="number">19</td><td>  <span class="k1">if</span><span class="k2">(</span>argc <span class="k3">&lt;</span> <span class="n">2</span><span class="k2">)</span></td></tr><tr><td class="number">20</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">21</td><td>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Usage: %s &lt;filename.mpg&gt;\n"</span></td></tr><tr><td class="number">22</td><td>                    <span class="s">"  &lt;filename.mpg&gt; can be either a file or an embedded datafile object.\n"</span>,</td></tr><tr><td class="number">23</td><td>                    argv<span class="k2">[</span><span class="n">0</span><span class="k2">]</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">24</td><td>&#160;</td></tr><tr><td class="number">25</td><td>    <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">26</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">27</td><td>&#160;</td></tr><tr><td class="number">28</td><td>  <a href="http://www.allegro.cc/manual/install_timer" target="_blank"><span class="a">install_timer</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">29</td><td>&#160;</td></tr><tr><td class="number">30</td><td>  <a href="http://www.allegro.cc/manual/install_sound" target="_blank"><span class="a">install_sound</span></a><span class="k2">(</span>DIGI_AUTODETECT, MIDI_NONE, NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">31</td><td>&#160;</td></tr><tr><td class="number">32</td><td>  <span class="c">// Set gfx mode</span></td></tr><tr><td class="number">33</td><td>  depth <span class="k3">=</span> <a href="http://www.allegro.cc/manual/desktop_color_depth" target="_blank"><span class="a">desktop_color_depth</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">34</td><td>  <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>depth<span class="k2">)</span></td></tr><tr><td class="number">35</td><td>    depth <span class="k3">=</span> <span class="n">8</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>&#160;</td></tr><tr><td class="number">37</td><td>  <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span>depth<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">38</td><td>  <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span></td></tr><tr><td class="number">39</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">40</td><td>    <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_FULLSCREEN, <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span></td></tr><tr><td class="number">41</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">42</td><td>      <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Couldn't set mode 640x480x%i:\n%s\n"</span>, depth,</td></tr><tr><td class="number">43</td><td>              <a href="http://www.allegro.cc/manual/allegro_error" target="_blank"><span class="a">allegro_error</span></a><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">44</td><td>      <span class="k1">return</span> <span class="k3">-</span><span class="n">1</span><span class="k2">;</span></td></tr><tr><td class="number">45</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">46</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">47</td><td>  <a href="http://www.allegro.cc/manual/clear_to_color" target="_blank"><span class="a">clear_to_color</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">48</td><td>&#160;</td></tr><tr><td class="number">49</td><td>  <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">50</td><td>&#160;</td></tr><tr><td class="number">51</td><td>  ret <span class="k3">=</span> apeg_play_mpg<span class="k2">(</span>argv<span class="k2">[</span><span class="n">1</span><span class="k2">]</span>, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, FALSE, NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">52</td><td>  <span class="k1">if</span><span class="k2">(</span>ret <span class="k3">=</span><span class="k3">=</span> APEG_ERROR<span class="k2">)</span></td></tr><tr><td class="number">53</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">54</td><td>    <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">55</td><td>    <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"APEG Error: %s\n"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">56</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">57</td><td>&#160;</td></tr><tr><td class="number">58</td><td>  <span class="k1">return</span> ret<span class="k2">;</span></td></tr><tr><td class="number">59</td><td><span class="k2">}</span></td></tr><tr><td class="number">60</td><td><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span></td></tr></tbody></table></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 14 Nov 2005 09:10:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I tried to put a &quot;-&quot; before the &quot;libapeg.a&quot;, but got an error saying that couldn&#39;t find: -libapeg.a
</p></div></div><p>
Becuase that&#39;s not right. The lib&lt;name&gt;.a files should be in your compiler&#39;s lib directory, and you link with them using -l&lt;name&gt; (similar to how Allegro is liballeg.a and you link with -lalleg).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 14 Nov 2005 09:21:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks again.</p><p>But now I am getting only this error:</p><p> C:\Dev-Cpp\Meus\ABCD\Makefile.win [Build Error]  [Testes.exe] Error 1 </p><p>I will try to reinstall Dev and Allegro like Victor said.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 14 Nov 2005 15:45:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
But now I am getting only this error:<br /> <br /> C:\Dev-Cpp\Meus\ABCD\Makefile.win [Build Error] [Testes.exe] Error 1
</p></div></div><p>
That&#39;s not the error. That just says that there was an error. The actual error should be before that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 14 Nov 2005 15:58:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>But the compile tab says only that.</p><p>The Compile Log says:<br />__________________________________</p><p>Compiler: Default compiler<br />Building Makefile: &quot;C:\Dev-Cpp\Meus\ABCD\Makefile.win&quot;<br />Executing  make...<br />make.exe -f &quot;C:\Dev-Cpp\Meus\ABCD\Makefile.win&quot; all<br />g++.exe -D__DEBUG__ testes.o  -o &quot;Testes.exe&quot; -L&quot;C:/Dev-Cpp/lib&quot; -L&quot;C:/Dev-Cpp/Meus/allegro/lib&quot; -L&quot;C:/Dev-Cpp/lib&quot; -l&lt;libapeg.a&gt; -l&lt;libogg.a&gt; -l&lt;libtheora.a&gt; -l&lt;libvorbis.a&gt; -l&lt;libvorbisenc.a&gt; -lalleg  -lgmon -pg  -g3 </p><p>O sistema nÆo pode encontrar o arquivo especificado. (The system couldn&#39;t find the file)</p><p>make.exe: *** [Testes.exe] Error 1</p><p>Execution terminated<br />_________________________________________
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 14 Nov 2005 17:07:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It can&#39;t find the libs. Double check those -l switches, and see why they aren&#39;t the same as liballeg.a/-lalleg
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 14 Nov 2005 18:01:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The linkers that I am using are:</p><p>-l&lt;libapeg.a&gt;<br />-l&lt;libogg.a&gt;<br />-l&lt;libtheora.a&gt;<br />-l&lt;libvorbis.a&gt;<br />-l&lt;libvorbisenc.a&gt;<br />-lalleg
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 14 Nov 2005 18:30:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Reread my post. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It can&#39;t find the libs. Double check those -l switches, and see why they aren&#39;t the same as liballeg.a/-lalleg
</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 14 Nov 2005 18:53:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Reread my post. </p><p>Quote:<br />It can&#39;t find the libs. Double check those -l switches, and see why they aren&#39;t the same as liballeg.a/-lalleg<br />--
</p></div></div><p>

Sorry... I didn&#39;t understand it. <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" /></p><p>What do you want to say with &quot;double check&quot; and &quot;why they aren&#39;t the same&quot;?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 14 Nov 2005 19:15:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, to use liballeg.a, you use -lalleg. So, to use libapeg.a, you use...?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 14 Nov 2005 19:20:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>-lapeg  ? </p><p>Didn&#39;t work <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" /> : </p><p> cannot find -lapeg </p><p>I will try to reinstall.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 14 Nov 2005 20:35:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
But the compile tab
</p></div></div><p> I didn&#39;t know the command line had a compile tab... anyway let us know what happens.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Mon, 14 Nov 2005 23:53:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>APEG.txt:</p><p>&quot;Windows users: If you&#39;re going to link against the static version of <br />Allegro, you&#39;ll need to create another lib of APEG. First you should run<br />&#39;cbuild clean&#39; to rid your drive of the object files (so they will<br />rebuild) and the temp lib. Then set the environment variable STATICLINK<br />(or pass --enable-static), followed by &#39;cbuild&#39; and &#39;cbuild install&#39;.<br />This will create apeg_s for you to use when linking with alleg_s.&quot;</p><p>Do I need to do that? Because I have only the binaries, and not &#39;cbuild&#39; and &#39;cbuild install&#39;.</p><p>------------</p><p>I reinstalled XP, dev-cpp, allegro <i>(copied the binaries to &quot;C:\Dev-</i><i>Cpp\include&quot; and &quot;C:\Dev-Cpp\lib&quot;, and the 3 &quot;.dll&quot; files to the</i> <i>folder of my project)</i> and APEG <i>(copied the &quot;.h&quot; files to &quot;C:</i><i>\Dev-Cpp\include&quot;, the &quot;.a&quot; files to &quot;C:\Dev-Cpp\lib&quot;, and the</i> <i>&quot;.dll&quot; files to my project folder).</i></p><p>Then I changed the linkers of my project to:</p><p>-lapeg<br />-logg<br />-ltheora<br />-lvorbis<br />-lvorbisenc<br />-lalleg</p><p>But when I try to compile I receive many errors of this type:</p><p>  [Linker error] undefined reference to `oggpackB_readinit&#39; <br />  [Linker error] undefined reference to `oggpackB_read&#39; <br />  [Linker error] undefined reference to `oggpackB_read&#39; <br />  more undefined references to `oggpackB_read&#39; follow <br />  [Linker error] undefined reference to `oggpackB_readinit&#39; <br />  [Linker error] undefined reference to `oggpackB_read&#39; </p><p>The problem is, as you can see in the code showed in previous post, I am not using any &quot;ogg&quot;. But when I try to delete the linkers related to APEG, I get only these errors:</p><p> C:\Dev-Cpp\Meus\ABCD\testes.o(.text+0x1a9) In function `Z13_mangled_mainiPPc&#39;: <br />  [Linker error] undefined reference to `apeg_play_mpg&#39; <br />  [Linker error] undefined reference to `apeg_error&#39; <br /> C:\Dev-Cpp\Meus\ABCD\testes.o(.text+0x1a9) ld returned 1 exit status <br /> C:\Dev-Cpp\Meus\ABCD\Makefile.win [Build Error]  [Testes.exe] Error 1 </p><p>These errors make sense, because I AM using `apeg_play_mpg&#39; in the code.<br />When I add the linkers, the `apeg_play_mpg&#39; errors are solved, but I gain the &quot;ogg&quot; errors.</p><p>I hope this explain all the problem.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Tue, 15 Nov 2005 04:58:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try permuting the order in which you link the libraries. In particular, put libogg.a before libapeg.a<br />EDIT: actually, try putting libapeg.a just before liballeg.a.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Tue, 15 Nov 2005 05:06:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Now got more errors:</p><p>  [Linker error] undefined reference to `vorbis_block_clear&#39; <br />  [Linker error] undefined reference to `vorbis_dsp_clear&#39; <br />  [Linker error] undefined reference to `ogg_stream_clear&#39; <br />  [Linker error] undefined reference to `ogg_sync_clear&#39; <br />  [Linker error] undefined reference to `theora_clear&#39; <br />  [Linker error] undefined reference to `theora_info_clear&#39; </p><p>...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Tue, 15 Nov 2005 05:22:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I reinstalled XP
</p></div></div><p> Why?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Do I need to do that? Because I have only the binaries, and not &#39;cbuild&#39; and &#39;cbuild install&#39;.
</p></div></div><p> No, because you have the binaries, you do not have to build the package.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Then I changed the linkers of my project to:</p><p>-lapeg<br />-logg<br />-ltheora<br />-lvorbis<br />-lvorbisenc<br />-lalleg
</p></div></div><p>
that&#39;s good, just make sure that you change them to the order you need them in, as evert alluded to.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
But when I try to compile I receive many errors of this type:</p><p>[Linker error] undefined reference to `oggpackB_readinit&#39; <br />[Linker error] undefined reference to `oggpackB_read&#39; <br />[Linker error] undefined reference to `oggpackB_read&#39; <br />more undefined references to `oggpackB_read&#39; follow <br />[Linker error] undefined reference to `oggpackB_readinit&#39; <br />[Linker error] undefined reference to `oggpackB_read&#39;
</p></div></div><p>

Right, so the apeg library is using the ogg library, so I belive you want to include the -logg/vorbis/theora before -lapeg.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
C:\Dev-Cpp\Meus\ABCD\testes.o(.text+0x1a9) In function `Z13_mangled_mainiPPc&#39;: <br />[Linker error] undefined reference to `apeg_play_mpg&#39; <br />[Linker error] undefined reference to `apeg_error&#39; <br />C:\Dev-Cpp\Meus\ABCD\testes.o(.text+0x1a9) ld returned 1 exit status <br />C:\Dev-Cpp\Meus\ABCD\Makefile.win [Build Error] [Testes.exe] Error 1
</p></div></div><p> Right, like you said.  That makes sense.</p><p>So, even if conditional logic prevents a call from ever happening (ex: when you load your video, it&#39;s not ogg/theora/vorbis format), for your code to link properly all of the external dependencies must be known to the linker.  So your project is using apeg, which is using (conditionally) ogg/vorbis/theora, etc...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Tue, 15 Nov 2005 10:43:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I changed the order, but only got more kinds of errors:</p><p>[Linker error] undefined reference to `vorbis_block_clear&#39; <br />[Linker error] undefined reference to `vorbis_dsp_clear&#39; <br />[Linker error] undefined reference to `ogg_stream_clear&#39; <br />[Linker error] undefined reference to `ogg_sync_clear&#39; <br />[Linker error] undefined reference to `theora_clear&#39; <br />[Linker error] undefined reference to `theora_info_clear&#39;</p><p>Now not only &quot;ogg&quot;, but &quot;theora&quot; and &quot;vorbis&quot; are in conflict too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 16 Nov 2005 04:19:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This is the order APEG uses for the examples:<br /><span class="source-code"><span class="k3">-</span>ltheora <span class="k3">-</span>lvorbis <span class="k3">-</span>lvorbisenc <span class="k3">-</span>logg <span class="k3">-</span>lapeg <span class="k3">-</span>lalleg</span>Try that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 16 Nov 2005 04:49:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" /></p><p>Still got the same errors (about vorbis, theora and ogg).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 16 Nov 2005 05:30:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>it sounds like something else is using theora. vorbis, and ogg, that is being referenced before they are....
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Wed, 16 Nov 2005 05:37:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wonder if it has anything to do with the fact that APEG&#39;s precompiled, and conflicting with the existing Ogg libs.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 16 Nov 2005 05:53:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Right, maybe if it was compiled against a different version, then no matter what order he puts them in, it won&#39;t recognize ogg/theora/vorbis, etc because they&#39;re the wrong version.  Correct?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Wed, 16 Nov 2005 12:48:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So.... I need compile APEG.</p><p>Trying again:<br />______________________________________________________</p><p>C:\Hangar6\apeg&gt;c:\dev-cpp\bin\mingw32-make.exe<br />cc -W -Wall -Werror -02    cbuild.c   -o cbuid<br />process_begin: CreateProcess((null), cc -W -Werror -02 cbuild.c -o cbuild, ...) failed.<br />make (e=2): The system couldn&#39;t find the file.<br />c:\dev-cpp\bin\mingw32-make.exe: *** [cbuild] Error 2</p><p>C:\Hangar\apeg&gt;</p><p>______________________________________________________</p><p>Got the same error as before. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /><br />I still don&#39;t know how to run &quot;make&quot;.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 17 Nov 2005 02:50:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There&#39;s a small bug in the Makefile. Edit it and change $(MINGW) to $(MINGDIR) on the first line.</p><p>Or you can compile and run cbuild manually:
</p><div class="source-code snippet"><div class="inner"><pre>gcc <span class="k3">-</span>O2 <span class="k3">-</span>W <span class="k3">-</span>Wall cbuild.c <span class="k3">-</span>o cbuild.exe
cbuild.exe
</pre></div></div><p>

</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I still don&#39;t know how to run &quot;make&quot;.
</p></div></div><p>
That&#39;s what you&#39;re doing when you run mingw32-make.exe.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Thu, 17 Nov 2005 07:11:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I tried to correct the make file, but got the same error.<br />Then used the &quot;gcc&quot; command. It complained that didn&#39;t know the &quot;-02&quot; variable. So I tried without the &quot;-02&quot;, and it created the &quot;cbuild.exe&quot; file. So I run the &quot;cbuild.exe&quot;, but it showed many errors.<br />Please see attached file for a screen-shot with the errors.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 17 Nov 2005 07:46:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It seems you need to download and compile the ogg vorbis library. Also, you need to set your MINGDIR variable to point where you have the gcc.exe file.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Thu, 17 Nov 2005 07:49:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Okay, there&#39;s a few problems with the cbuild script (it should&#39;ve stopped after complaining about MINGDIR), but the underlying problem is that MINGDIR isn&#39;t set. I don&#39;t quite remember h ow to set it in Windows... I think it&#39;s right-click My Computer-&gt;Properties-&gt;Advanced-&gt;Environment Variables. Set it to your base MinGW dir (C:\Dev-Cpp in this case, I think). As well, make sure C:\Dev-Cpp\bin is the first thing in your path.</p><p>Also, that&#39;s -O2, not -02 (capital letter o, not the number zero).</p><p>EDIT: I just uploaded APEG 1.1.1 (check my sig), which should fix the makefile and script issues. You&#39;ll still need to get the Theora, Vorbis, and Ogg libs and headers installed if you want support for them, though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Thu, 17 Nov 2005 07:54:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>My MINGDIR was set to &quot;C:\Dev-Cpp&quot;. I changed it to &quot;C:\Dev-Cpp\bin&quot;, but got the same errors.<br />So downloaded the new APEG 1.1.1 and tried to run make in it. But got the same errors again. Then tried to run the &quot;gcc ....&quot; command, but now it stopped saying:<br />_____________________________________________</p><p>Testing for Xv support... tmp.c:2: error: syntax error before &quot;tmp&quot;<br />tmp.c:2:168: invalid suffix &quot;$&quot; on integer constant<br />not found</p><p>Your MINGDIR environment variable is not set!<br />_____________________________________________</p><p>But the variable IS set. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>-----------------------------------------------------------<br />EDIT:<br />Oh! Got it!<br />The MINGDIR variable was at my &quot;System Variables&quot;, I created the same variable, but now at &quot;Variables for users&quot;. Now &quot;make&quot; worked!</p><p>I am still trying to correct the problem with the libraries.<br />-----------------------------------------------------------<br />EDIT:<br />Ok, how do I compile ogg, theora and vorbis?<br />There are many makefiles, but they are &quot;.am&quot; and &quot;.in&quot;<br />I tried to read the docs, but found texts only about the commands.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 17 Nov 2005 17:27:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">the APEG Makefile said:</div><div class="quote"><p>

ifneq ($(MINGW)$(DJGPP),)
</p></div></div><p>

Shouldn&#39;t it be &quot;ifeq&quot;?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Fri, 18 Nov 2005 06:15:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Shouldn&#39;t it be &quot;ifeq&quot;?
</p></div></div><p>
No. I want that section to run when MINGDIR or DJDIR does <b>not</b> equal nothing.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Ok, how do I compile ogg, theora and vorbis?
</p></div></div><p>
Get a sh-compatible shell (such as the one that comes with MSys). Then you can run the configure script and then make.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 18 Nov 2005 08:07:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>you might be able to download binaries of those libaries, since I&#39;m assuming that&#39;s all you need, and you can compile apeg agains them; also if you&#39;re not going to use that functionality, you can disable it before compiliing, and then you will not need them.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
the &quot;-02&quot; variable
</p></div></div><p> As KC already said it&#39;s -O2; but also it means to use a specific type of optimization, there is an -O1 also. I belive -O2 is for speed...?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I don&#39;t quite remember h ow to set it in Windows
</p></div></div><p> Should be in the allegro instructions...</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Oh! Got it!
</p></div></div><p> RIGHT ON! <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Fri, 18 Nov 2005 14:04:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
you might be able to download binaries of those libaries, since I&#39;m assuming that&#39;s all you need
</p></div></div><p>
Last time I looked, I wasn&#39;t able to find binaries. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /> No official ones, anyway.</p><p>As for optimization switches:
</p><ul><li><p>-O0 - Turn off optimizations. Default</p></li><li><p>-O1 - Light optimizations for speed</p></li><li><p>-O2 - More optimizations</p></li><li><p>-O3 - Heavy optimization. Can potentially break code or cause a performance hit</p></li></ul><p>&lt;/li&gt;<br />You can only use one. If you specify more than one, the last one specified is used.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 18 Nov 2005 15:13:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hmm... I did&#39;t know that about -03 ... I wonder if that&#39;s what dev-cpp used by default in a certain 4.x version...</p><p>I had downloaded it and compiled a working game with it (that was my own, at the commandline I was passing in -O2); but it crashed left and right, and had all kinds of issues when compiled by dev-cpp&#39;s gcc, which also liked to pass in about a page and half of other wierd <span class="cuss"><span>ass</span></span> arugments...</p><p>moral: don&#39;t use dev-cpp! <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michael Jensen)</author>
		<pubDate>Fri, 18 Nov 2005 15:22:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Note that it&#39;s rare for -O3 to cause a crash. The more code trickery you use, the more likely it is to happen, but under normal cirumstances it&#39;s fine. Generated code speed is another issue, though. That depends greatly on the code and the processor.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 18 Nov 2005 17:20:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Then you can run the configure script and then make.
</p></div></div><p>

I tried to type &quot;configure&quot;, but it didn&#39;t recognize the command.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Fri, 18 Nov 2005 22:49:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In a sh-shell, you need to use ./configure
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Sat, 19 Nov 2005 09:51:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am using the shell that comes with Windows XP.<br />Used the &quot;cd&quot; command until the &quot;libogg-1.1.2&quot; folder.<br />There tried:</p><p>./configure<br />/configure<br />configure</p><p>But I got the same answer:</p><p>&#39;....&#39; is not recognized as a internal or external command or an operational program.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sat, 19 Nov 2005 17:08:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">I said:</div><div class="quote"><p>
Get a sh-compatible shell (such as the one that comes with MSys). Then you can run the configure script and then make.
</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Sat, 19 Nov 2005 17:41:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I said:<br />Get a sh-compatible shell (such as the one that comes with MSys). Then you can run the configure script and then make.
</p></div></div><p>

Where can I get a sh-compatible shell?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sun, 20 Nov 2005 01:50:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Kitty Cat said:</div><div class="quote"><p>
such as the one that comes with MSys
</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Sun, 20 Nov 2005 02:01:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /></p><p>But....what is MSys?<br />Windows?<br />Why isn&#39;t it working?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sun, 20 Nov 2005 02:55:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>MSYS is a part of MinGW: <a href="http://www.mingw.org/msys.shtml">http://www.mingw.org/msys.shtml</a><br />You can&#39;t use the windows shell to run scripts written for unix shells (including configure scripts), so you need to use MSYS or something equivalent.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sun, 20 Nov 2005 04:48:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, thanks, I downloaded MSys.<br />Read the &quot;readme&quot;.<br />But HOW DO I USE THAT?</p><p><img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sun, 20 Nov 2005 07:52:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Use what?  MSYS?  It&#39;s a shell.  You run it.  It gives you a prompt.  You type &quot;cd c:&quot;, then us cd to navigate to the library directory.  Then you type &quot;./configure&quot;.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sun, 20 Nov 2005 08:42:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OHHHHHHHHHHHH!</p><p>Thanks! I was typing &quot;c:&quot; only. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>It is too late here, need to sleep.<br />I will post tomorrow. <br />Opsss! (Today is tomorrow) <br />I will post later.</p><p>------------------------------------------</p><p>EDIT:</p><p>Ok, compiled ogg using the &quot;./configure&quot; and &quot;make&quot; commands.<br />Then tried  to compile theora and vorbis the same way, but got an error that says I need to install ogg. <br />I tried to run &quot;install&quot; in the ogg folder, but got an error about &quot;few arguments&quot;. So typed &quot;install --help&quot;. It says:<br />_____________________________________________________<br />Usage: install [OPTION]... SOURCE DEST           (1st format)<br />  or:  install [OPTION]... SOURCE... DIRECTORY   (2nd format)<br />  or:  install -d [OPTION]... DIRECTORY...       (3rd format)<br />In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to<br />the existing DIRECTORY, while setting permission modes and owner/group.<br />In the third format, create all components of the given DIRECTORY(ies).</p><p>      --backup[=CONTROL] make a backup of each existing destination file<br />  -b                  like --backup but does not accept an argument<br />  -c                  (ignored)<br />  -d, --directory     treat all arguments as directory names; create all<br />                        components of the specified directories<br />  -D                  create all leading components of DEST except the last,<br />                        then copy SOURCE to DEST;  useful in the 1st format<br />  -g, --group=GROUP   set group ownership, instead of process&#39; current group<br />  -m, --mode=MODE     set permission mode (as in chmod), instead of rwxr-xr-x<br />  -o, --owner=OWNER   set ownership (super-user only)<br />  -p, --preserve-timestamps   apply access/modification times of SOURCE files<br />                        to corresponding destination files<br />  -s, --strip         strip symbol tables, only for 1st and 2nd formats<br />  -S, --suffix=SUFFIX override the usual backup suffix<br />  -v, --verbose       print the name of each directory as it is created<br />      --help          display this help and exit<br />      --version       output version information and exit</p><p>The backup suffix is `~&#39;, unless set with --suffix or SIMPLE_BACKUP_SUFFIX.<br />The version control method may be selected via the --backup option or through<br />the VERSION_CONTROL environment variable.  Here are the values:</p><p>  none, off       never make backups (even if --backup is given)<br />  numbered, t     make numbered backups<br />  existing, nil   numbered if numbered backups exist, simple otherwise<br />  simple, never   always make simple backups</p><p>Report bugs to &lt;bug-fileutils@gnu.org&gt;.<br />______________________________________________</p><p>I tried the 3 formats, but only 3rd format worked. But it only created an empty folder.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 21 Nov 2005 05:21:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I tried to run &quot;install&quot; in the ogg folder, but got an error about &quot;few arguments&quot;.
</p></div></div><p>
Run &quot;make install&quot; (without quotes) in the Ogg folder (as well as the Vorbis and Theora folders after running configure and make in them).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 21 Nov 2005 07:45:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I used:</p><p>./configure<br />make<br />install</p><p>inside the &quot;ogg&quot; folder.<br />But when I run &quot;./configure&quot; inside the &quot;theora&quot; folder, I get this error at the end:<br />___________________________________</p><p>checking for Ogg... no<br />*** Could not run Ogg test program, checking why...<br />*** The test program failed to compile or link. See the file config.log for the<br />*** exact error that occured. This usually means Ogg was incorrectly installed<br />*** or that you have moved Ogg since it was installed.<br />configure: error:<br />    libogg is required to build this package!<br />    please see <a href="http://www.xiph.org/">http://www.xiph.org/</a> for how to<br />    obtain a copy.<br />__________________________________</p><p>My folders:</p><p>C:\Hangar6\apeg (Apeg folder)<br />C:\Hangar6\o (ogg folder, where I ran the configure, make and make install)<br />C:\Hangar6\t (theora folder, where I tried to run the configure)<br />C:\Hangar6\v (vorbis folder, where I tried to run the configure)</p><p>Do I need to change anything about the folders?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 21 Nov 2005 08:08:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
./configure<br />make<br />install
</p></div></div><p>
Run &#39;make install&quot;, not &#39;install&quot;.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 21 Nov 2005 08:38:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Opsss.<br />Mistyped.<br />I ran &quot;make install&quot;</p><p>-------------</p><p>It looks like that theora wants the &quot;ogg.h&quot;.<br />But where should I place it?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 21 Nov 2005 09:01:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In the Ogg folder, run &quot;make uninstall&quot;. Then run &quot;./configure --prefix=/mingw&quot; and then &quot;make install&quot; again.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 21 Nov 2005 09:22:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks!</p><p>(I had to use &quot;./configure --prefix=/mingw&quot; in theora folder too.)</p><p>Then tried the same at vorbis, and worked.<br />After tried &quot;make&quot;, but got this error:<br />_____________________________</p><p>collect2: ld returned 1 exit status<br />make[3]: *** [libvorbisfile.la] Error 1<br />make[3]: Leaving directory `/c/hangar6/v/lib&#39;<br />make[2]: *** [all-recursive] Error 1<br />make[2]: Leaving directory `/c/hangar6/v/lib&#39;<br />make[1]: *** [all-recursive] Error 1<br />make[1]: Leaving directory `/c/hangar6/v&#39;<br />make: *** [all] Error 2<br />_____________________________</p><p>Tried &quot;make install after that, but got the same error.</p><p>Then I checked the &quot;C:\1.0\mingw\&quot; folder to see the installed files.</p><p>There are include and lib files for ogg and theora, but no vorbis and only one dll (libogg-0.dll).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Mon, 21 Nov 2005 19:34:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think libtheora is currently broken. You should be able to disable libvorbisfile and/or build static-only libs instead. Check ./configure --help for the switches.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Mon, 21 Nov 2005 20:23:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m gotting the same problem with allog, but i&#39;m using only libogg and libvorbis. Trying to compile that for 12 or 13 now, and it just don&#39;t work. Libvorbis doesn&#39;t focken compiles even by the hell!</p><p>And ./configure --help doesn&#39;t give any useful flagss.</p><p>EDIT (some hours later): I was very stressed and angry with that, let&#39;s try again...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Mon, 21 Nov 2005 20:39:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Which  switch should I use? &quot;--disable-vorbistest&quot;?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Tue, 22 Nov 2005 00:15:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think it was --enable-static and/or --disable-dynamic, or something along those lines. You can also send an email to libvorbis&#39;s maintainers and inform them of the problem.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Tue, 22 Nov 2005 06:18:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ohhh. FINALLY!!!!</p><p>I COMPILED THAT LIBVORBIS!</p><p>After trying to understand the structure of that horrible messy, confusing, large and incompreensible makefiles, i could fix it with that script:
</p><div class="source-code snippet"><div class="inner"><pre>

cd .<span class="k3">/</span>lib
<span class="k3">/</span>bin<span class="k3">/</span>sh ..<span class="k3">/</span>libtool <span class="k3">-</span><span class="k3">-</span>tag<span class="k3">=</span>CC <span class="k3">-</span><span class="k3">-</span>mode<span class="k3">=</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_531.html" target="_blank">link</a> gcc  <span class="k3">-</span>O20 <span class="k3">-</span>D__NO_MATH_INLINES <span class="k3">-</span>fsigned-char  <span class="k3">-</span>DUSE_MEMORY_H   <span class="k3">-</span>o libvorbisfile.la <span class="k3">-</span>no-undefined <span class="k3">-</span>version-info <span class="n">4</span><span class="k2">:</span><span class="n">0</span><span class="k2">:</span><span class="n">1</span> vorbisfile.lo libvorbis.la 
sys_lib_search_path_spec<span class="k3">=</span><span class="s">" =c:/Dev-Cpp/lib/gcc/mingw32/3.4.2/ c:/Dev-Cpp/lib/gcc/mingw32/ c:/Dev-Cpp/lib/gcc/ c:/Dev-Cpp/mingw32/lib/ c:/Dev-Cpp/lib/"</span>
rm <span class="k3">-</span>fr  .libs<span class="k3">/</span>libvorbisfile.dll.a
gcc <span class="k3">-</span>shared  .libs<span class="k3">/</span>vorbisfile.o  <span class="k3">-</span>logg <span class="k3">-</span>logg.dll  .<span class="k3">/</span>.libs<span class="k3">/</span>libvorbis.dll.a  <span class="k3">-</span>o .libs<span class="k3">/</span>libvorbisfile-3.dll <span class="k3">-</span>Wl,<span class="k3">-</span><span class="k3">-</span>image-base<span class="k3">=</span><span class="n">0x10000000</span> <span class="k3">-</span>Wl,<span class="k3">-</span><span class="k3">-</span>out-implib,.libs<span class="k3">/</span>libvorbisfile.dll.a
</pre></div></div><p>

Save this in some file called, say &quot;fixthatsh1t&quot;.</p><p>So, first of all: Install Ogg, which is &quot;./configure --prefix=/mingw&quot;, then &quot;make&quot; and &quot;make install&quot;.</p><p>Second, install Vorbis: &quot;./configure --prefix=/mingw&quot;, &quot;make&quot;, you&#39;ll get some errors about make, so run &quot;./fixthatsh1t&quot;, run &quot;make&quot; again and then &quot;make install&quot;.</p><p>Third, install Theora: I will try this later, but if we are luck it will be the same to install Ogg.</p><p>Forth (finally): Install Apeg.</p><p>But, i still need know something. When i compile my game (in Alogg), i get that:
</p><div class="source-code snippet"><div class="inner"><pre>

Info: resolving _allegro_errno by linking to __imp__allegro_errno <span class="k2">(</span>auto-import<span class="k2">)</span>
fu000001.o:: undefined reference to `lib_mingw32_liballeg_a_iname<span class="s">'</span>
<span class="s">nmth000000.o:: undefined reference to `_nm__allegro_errno'</span>
collect2: ld returned <span class="n">1</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> status

make.exe: <span class="k3">*</span><span class="k3">*</span><span class="k3">*</span> <span class="k2">[</span>Asmodan.exe<span class="k2">]</span> Error <span class="n">1</span>
</pre></div></div><p>

We are almost there!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Tue, 22 Nov 2005 18:36:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Weeeeeeeeeeeeeeeeeeeeeeeeeeeew! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>It worked!</p><p>GREAT THANKS TO EVERYONE!!!!</p><p>I needed to reconfigure ogg to &quot;mingw32&quot; (it was set to &quot;mingw&quot;).<br />And needed to copy the &quot;ogg\ogg.h&quot;, &quot;theora\theora.h&quot; and &quot;vorbis\codec.h&quot; to &quot;apeg\include\&quot; folder manually, and needed to copy &quot;libapeg.a&quot; to &quot;Dev-Cpp\lib&quot; manually too.<br />And needed to use this sequence in the linkers:</p><p>-lapeg<br />-ltheora<br />-lvorbis<br />-lvorbisenc<br />-logg<br />-lalleg</p><p>But got no &quot;linker error&quot;!</p><p>Now I just need to learn Apeg&#39;s commands. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>-----------------------------------</p><p>EDIT:</p><p>I need to play an .ogg music.<br />Found this command in apeg.txt:</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/SAMPLE" target="_blank"><span class="a">SAMPLE</span></a> <span class="k3">*</span>apeg_preload_audio<span class="k2">(</span><span class="k1">const</span> <span class="k1">char</span> <span class="k3">*</span>filename<span class="k2">)</span><span class="k2">;</span></span></p><p>I tried:</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/SAMPLE" target="_blank"><span class="a">SAMPLE</span></a> <span class="k3">*</span>apeg_preload_audio<span class="k2">(</span><span class="s">"15.ogg"</span><span class="k2">)</span><span class="k2">;</span></span></p><p>But it complained about &quot;bad conversion - const chat to SAMPLE*&quot;.</p><p>So tried:</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/SAMPLE" target="_blank"><span class="a">SAMPLE</span></a> <span class="k3">*</span>musica <span class="k3">=</span> <a href="http://www.allegro.cc/manual/load_sample" target="_blank"><span class="a">load_sample</span></a><span class="k2">(</span><span class="s">"15.ogg"</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/SAMPLE" target="_blank"><span class="a">SAMPLE</span></a> <span class="k3">*</span>apeg_preload_audio<span class="k2">(</span>musica<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/play_sample" target="_blank"><span class="a">play_sample</span></a><span class="k2">(</span>apeg_preload_audio, <span class="n">255</span>, <span class="n">128</span>, <span class="n">1000</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

It compiles, but closes the program when I click to load it.</p><p>PS.: Does anyone know a good AVI-&gt;MPG converter? <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Tue, 22 Nov 2005 22:15:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sure, it&#39;ll compile, but it should die horribly when run.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
SAMPLE *spl = apeg_preload_audio(&quot;somefilename.someextension&quot;);<br />play_sample(spl, 255, 128, 1000, 0);
</p></div></div><p>

Don&#39;t take this the wrong way, but do you even know C?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 23 Nov 2005 04:16:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Don&#39;t take this the wrong way, but do you even know C?
</p></div></div><p>

In real all I know about C, I learnt reading one or two tutorials over the internet. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p>--</p><p>I tested:</p><p>SAMPLE *spl = apeg_preload_audio(&quot;example.ogg&quot;);<br />play_sample(spl, 255, 128, 1000, 0);</p><p>But happened the same as before. Is it possible to be using an incompatible ogg format?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 23 Nov 2005 06:34:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Its possible apeg_preload_audio is buggy. Everytime I think I fix it, I find something else wrong. It might also be that the file isn&#39;t loading, so check if it&#39;s NULL before calling play_sample.</p><p>If it crashes before it ever gets to play_sample, try using apeg_play_mpg instead (yes, the name is a misnomer; it&#39;s a hold-over from before Ogg support was added <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />). If that plays, doesn&#39;t crash, and doesn&#39;t return an error, then it&#39;s a problem in apeg_preload_audio.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 23 Nov 2005 08:22:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>apeg_play_mpg worked.</p><p>But it shows a black screen. I need to show another images, and make the music to fade out after sometime.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 23 Nov 2005 09:14:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>apeg_play_mpg was just a test to make sure it wasn&#39;t a problem with the file. I think I found the problem, so I&#39;ll upload a new version of APEG (1.1.2). Delete your current APEG directory and extract the new archive.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 23 Nov 2005 09:46:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>NEW? <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>Don&#39;t tell me that I will need to recompile that thing! <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>hehe</p><p>Downloading.... <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>-------------------------------</p><p>EDIT:</p><p>Recompiled APEG, and updated the &quot;libapeg.a&quot;.<br />Then tried again the:</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/SAMPLE" target="_blank"><span class="a">SAMPLE</span></a> <span class="k3">*</span>spl <span class="k3">=</span> apeg_preload_audio<span class="k2">(</span><span class="s">"15.ogg"</span><span class="k2">)</span><span class="k2">;</span>

<span class="c">//++++++++++     </span>
     <span class="k1">if</span><span class="k2">(</span>spl <span class="k3">=</span><span class="k3">=</span> NULL<span class="k2">)</span>
<span class="k2">{</span>
   <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Could not load 15.ogg!"</span><span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
<span class="c">//++++++++++ </span>

<a href="http://www.allegro.cc/manual/play_sample" target="_blank"><span class="a">play_sample</span></a><span class="k2">(</span>spl, <span class="n">255</span>, <span class="n">128</span>, <span class="n">1000</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

This time it closes the program without the error message. So I think the problem is in the last command.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 23 Nov 2005 17:38:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For Ogg music, you probably shouldn&#39;t load it all at once, anyway. I&#39;ll continue looking into this problem, but for now, you could try to do this to play the music:
</p><div class="source-code snippet"><div class="inner"><pre>APEG_STREAM <span class="k3">*</span>stream <span class="k3">=</span> apeg_open_stream<span class="k2">(</span><span class="s">"15.ogg"</span><span class="k2">)</span><span class="k2">;</span>
<span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>stream<span class="k2">)</span>
   error<span class="k2">(</span><span class="s">"couldn't open 15.ogg because: %s"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span>
..
<span class="c">/* in main loop, regularly call: */</span>
<span class="k1">if</span><span class="k2">(</span>apeg_advance_stream<span class="k2">(</span>stream, TRUE<span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> APEG_OK<span class="k2">)</span>
   error<span class="k2">(</span><span class="s">"song stopped because: %s"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span>
<span class="c">/* if you're not looping, that can return APEG_EOF, which is not an error */</span>
..
<span class="c">/* when done: */</span>
apeg_close_stream<span class="k2">(</span>stream<span class="k2">)</span><span class="k2">;</span>
stream <span class="k3">=</span> NULL<span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 23 Nov 2005 19:55:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I needed to change the error messages to:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>stream<span class="k2">)</span><span class="k2">{</span>
               <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"couldn't open 15.ogg because: %s"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

, because it didn&#39;t recognized &quot;error&quot;.<br />It compiled and opened the program. But played no music and showed no error message.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 23 Nov 2005 21:28:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You&#39;d have to show more code. If the stream opened, and you regularly call that function, you should hear the music.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
it didn&#39;t recognized &quot;error&quot;
</p></div></div><p>
It was psuedo code, letting you know to handle it like an error if that happened. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 23 Nov 2005 22:04:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Here is the function where I am using the command:</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="k1">void</span> novocarr<span class="k2">(</span><a href="http://www.allegro.cc/manual/DATAFILE" target="_blank"><span class="a">DATAFILE</span></a> <span class="k3">*</span>data, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>tela<span class="k2">)</span></td></tr><tr><td class="number">2</td><td><span class="k2">{</span></td></tr><tr><td class="number">3</td><td>     <a href="http://www.allegro.cc/manual/set_trans_blender" target="_blank"><span class="a">set_trans_blender</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span>, <span class="n">128</span><span class="k2">)</span><span class="k2">;</span>    </td></tr><tr><td class="number">4</td><td>      </td></tr><tr><td class="number">5</td><td>     p <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">6</td><td>     </td></tr><tr><td class="number">7</td><td>     APEG_STREAM <span class="k3">*</span>stream <span class="k3">=</span> apeg_open_stream<span class="k2">(</span><span class="s">"15.ogg"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">8</td><td>&#160;</td></tr><tr><td class="number">9</td><td><span class="c">//------------     </span></td></tr><tr><td class="number">10</td><td>     <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>stream<span class="k2">)</span></td></tr><tr><td class="number">11</td><td>     <span class="k2">{</span></td></tr><tr><td class="number">12</td><td>      <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td>      <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"couldn't open 15.ogg because: %s"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>      <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td>     <span class="k2">}</span></td></tr><tr><td class="number">16</td><td><span class="c">//------------</span></td></tr><tr><td class="number">17</td><td>             </td></tr><tr><td class="number">18</td><td>     <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span>p <span class="k3">=</span><span class="k3">=</span> <span class="n">1</span><span class="k2">)</span></td></tr><tr><td class="number">19</td><td>     <span class="k2">{</span> </td></tr><tr><td class="number">20</td><td>      <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span>tela,<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>titulo<span class="k2">]</span>.dat, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>   </td></tr><tr><td class="number">21</td><td>      <a href="http://www.allegro.cc/manual/textprintf_ex" target="_blank"><span class="a">textprintf_ex</span></a><span class="k2">(</span>tela, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">50</span>, <span class="n">240</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>,<span class="n">255</span>,<span class="n">255</span><span class="k2">)</span>,<span class="k3">-</span><span class="n">1</span>,<span class="s">"%s, você deseja começar um novo jogo ou carregar outro?"</span>,the_name<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">22</td><td>&#160;</td></tr><tr><td class="number">23</td><td>      botao0<span class="k2">(</span>data,tela,<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>novo<span class="k2">]</span>.dat<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">24</td><td>      botaoM<span class="k2">(</span>data,tela,<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>carr<span class="k2">]</span>.dat<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">25</td><td><span class="c">//      botao2(data,tela,(BITMAP*)data[novo].dat);</span></td></tr><tr><td class="number">26</td><td>      botaoS<span class="k2">(</span>data,tela,<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>sair<span class="k2">]</span>.dat<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">27</td><td>                  </td></tr><tr><td class="number">28</td><td>      <a href="http://www.allegro.cc/manual/show_mouse" target="_blank"><span class="a">show_mouse</span></a><span class="k2">(</span>tela<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">29</td><td>      <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>tela, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">640</span>,<span class="n">480</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">30</td><td>      <a href="http://www.allegro.cc/manual/clear_bitmap" target="_blank"><span class="a">clear_bitmap</span></a><span class="k2">(</span>tela<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">31</td><td>      </td></tr><tr><td class="number">32</td><td><span class="c">//------------      </span></td></tr><tr><td class="number">33</td><td>      <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span>stream<span class="k2">)</span></td></tr><tr><td class="number">34</td><td>      <span class="k2">{</span></td></tr><tr><td class="number">35</td><td>       <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>       <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"song stopped because: %s"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">37</td><td>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">38</td><td>      <span class="k2">}</span></td></tr><tr><td class="number">39</td><td><span class="c">//------------      </span></td></tr><tr><td class="number">40</td><td>      </td></tr><tr><td class="number">41</td><td>     <span class="k2">}</span></td></tr><tr><td class="number">42</td><td>     </td></tr><tr><td class="number">43</td><td>     <span class="c">/* when done: */</span></td></tr><tr><td class="number">44</td><td>apeg_close_stream<span class="k2">(</span>stream<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">45</td><td>stream <span class="k3">=</span> NULL<span class="k2">;</span></td></tr><tr><td class="number">46</td><td>      </td></tr><tr><td class="number">47</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 23 Nov 2005 22:40:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Call me slow, but I don&#39;t see any apeg_advance_stream() calls in that code...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 23 Nov 2005 22:50:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There is no &quot;apeg_advance_stream()&quot;. What is it?</p><p>I am only using: </p><div class="source-code snippet"><div class="inner"><pre>APEG_STREAM <span class="k3">*</span>stream <span class="k3">=</span> apeg_open_stream<span class="k2">(</span><span class="s">"15.ogg"</span><span class="k2">)</span><span class="k2">;</span>
apeg_close_stream<span class="k2">(</span>stream<span class="k2">)</span><span class="k2">;</span>
stream <span class="k3">=</span> NULL<span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Wed, 23 Nov 2005 23:00:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
There is no &quot;apeg_advance_stream()&quot;. What is it?
</p></div></div><p>

</p><div class="quote_container"><div class="title">Kitty cat said:</div><div class="quote"><p>

but for now, you could try to do this to play the music:</p><p>APEG_STREAM *stream = apeg_open_stream(&quot;15.ogg&quot;);<br />if(!stream)<br />   error(&quot;couldn&#39;t open 15.ogg because: %s&quot;, apeg_error);<br />..<br />/* in main loop, regularly call: */<br />if(<b>apeg_advance_stream</b>(stream, TRUE) != APEG_OK)<br />   error(&quot;song stopped because: %s&quot;, apeg_error);<br />/* if you&#39;re not looping, that can return APEG_EOF, which is not an error */<br />..<br />/* when done: */<br />apeg_close_stream(stream);<br />stream = NULL;
</p></div></div><p>

Be a bit more careful about reading other people&#39;s posts (especially if they wrote the thing you&#39;re using)! <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Right now, all you&#39;re doing is reading the file from disk. You&#39;re not playing it, so it stands to reason that you don&#39;t hear any music playing when you run your code!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 23 Nov 2005 23:44:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sorry. <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" /></p><p>I don&#39;t know why I changed that part of the code. It is working now. Thanks again. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>------------</p><p>How to set the volume of the song?<br />And is there a way to put an ogg file inside a datafile?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 24 Nov 2005 00:09:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How to set the volume of the song?
</p></div></div><p>
Use<br /><span class="source-code"><span class="k1">int</span> voice <span class="k3">=</span> apeg_get_stream_voice<span class="k2">(</span>stream<span class="k2">)</span><span class="k2">;</span></span>to get the voice number of a loaded stream, and then use<br /><span class="source-code"><a href="http://www.allegro.cc/manual/voice_set_volume" target="_blank"><span class="a">voice_set_volume</span></a></span>to set its volume.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And is there a way to put an ogg file inside a datafile?
</p></div></div><p>
Yes. Just put it in as a binary chunk, then read with either:
</p><div class="source-code snippet"><div class="inner"><pre><span class="c">/* Direct from disk: */</span>
stream <span class="k3">=</span> apeg_open_stream<span class="k2">(</span><span class="s">"datafile.dat#object_name"</span><span class="k2">)</span><span class="k2">;</span>
<span class="c">/* if loaded into memory: */</span>
stream <span class="k3">=</span> apeg_open_memory_stream<span class="k2">(</span>datafile<span class="k2">[</span>object_name<span class="k2">]</span>.dat, datafile<span class="k2">[</span>object_name<span class="k2">]</span>.size<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
Then use apeg_advance_stream and apeg_close_stream as normal.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Thu, 24 Nov 2005 07:31:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What is a binary chunk? Because I couldn&#39;t use grabber to load the ogg.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 24 Nov 2005 07:42:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you use dat, it should load it as binary automatically. Using the -t switch (-t VORB or -t VRBS) is probably a good idea, too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Thu, 24 Nov 2005 07:49:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>Now I need to play a sound until the end and them continue the program.<br />Is there a command to do this or do I need &quot;while&quot; function?</p><p>I was trying this:</p><div class="source-code snippet"><div class="inner"><pre>      <span class="k1">while</span><span class="k2">(</span>t <span class="k3">&lt;</span> <span class="n">10</span><span class="k2">)</span>
      <span class="k2">{</span>
       t<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
       <span class="k1">if</span><span class="k2">(</span>apeg_advance_stream<span class="k2">(</span>stream, TRUE<span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> APEG_OK<span class="k2">)</span>
       <span class="k2">{</span>
        <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
        <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Nao pode tocar o som, porque: %s"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span>
        <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
       <span class="k2">}</span>
       <a href="http://www.allegro.cc/manual/rest" target="_blank"><span class="a">rest</span></a><span class="k2">(</span><span class="n">1000</span><span class="k2">)</span><span class="k2">;</span>
      <span class="k2">}</span>
</pre></div></div><p>

But the &quot;rest&quot; cuts sound each second. It only works this way:</p><div class="source-code snippet"><div class="inner"><pre>      <span class="k1">while</span><span class="k2">(</span>t <span class="k3">&lt;</span> <span class="n">10000</span><span class="k2">)</span>
      <span class="k2">{</span>
       t<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>
       <span class="k1">if</span><span class="k2">(</span>apeg_advance_stream<span class="k2">(</span>stream, TRUE<span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> APEG_OK<span class="k2">)</span>
       <span class="k2">{</span>
        <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
        <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Nao pode tocar o som, porque: %s"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span>
        <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
       <span class="k2">}</span>
      <span class="k2">}</span>
</pre></div></div><p>

But this would make the time to be different in each computer.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Thu, 24 Nov 2005 23:06:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How about:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">while</span><span class="k2">(</span><span class="k2">(</span>ret <span class="k3">=</span> apeg_advance_stream<span class="k2">(</span>stream, FALSE<span class="k2">)</span><span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span> APEG_OK<span class="k2">)</span> <span class="k2">{</span><span class="k2">}</span>
<span class="k1">if</span> <span class="k2">(</span>ret <span class="k3">=</span><span class="k3">=</span> APEG_ERROR<span class="k2">)</span> <span class="k2">{</span>
        <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_TEXT,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
        <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Nao pode tocar o som, porque: %s"</span>, apeg_error<span class="k2">)</span><span class="k2">;</span>
        <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
So you keep calling the function until it returns with EOF or ERROR
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 25 Nov 2005 02:27:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks!</p><p>Now it is working! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>Well.... you all REALLY helped me! Look the size of this thread! <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>--------<br />EDIT:</p><p>New problem <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p>I need to play a song while it shows a image, wait, and shows another image, wait....</p><p>But when I use the wait function, it cuts the song.</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="k1">void</span> esperar<span class="k2">(</span><span class="k1">int</span> x<span class="k2">)</span> <span class="c">//esperar = to wait</span></td></tr><tr><td class="number">2</td><td><span class="k2">{</span></td></tr><tr><td class="number">3</td><td>     clock_t start_time, cur_time<span class="k2">;</span></td></tr><tr><td class="number">4</td><td>         start_time <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_103.html" target="_blank">clock</a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">5</td><td>         <span class="k1">while</span><span class="k2">(</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_103.html" target="_blank">clock</a><span class="k2">(</span><span class="k2">)</span> <span class="k3">-</span> start_time<span class="k2">)</span> <span class="k3">&lt;</span> x <span class="k3">*</span> CLOCKS_PER_SEC<span class="k2">)</span><span class="k2">{</span><span class="k2">}</span></td></tr><tr><td class="number">6</td><td><span class="k2">}</span></td></tr><tr><td class="number">7</td><td>&#160;</td></tr><tr><td class="number">8</td><td><span class="k1">void</span> apresentar<span class="k2">(</span><a href="http://www.allegro.cc/manual/DATAFILE" target="_blank"><span class="a">DATAFILE</span></a> <span class="k3">*</span>data,<a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>tela<span class="k2">)</span></td></tr><tr><td class="number">9</td><td><span class="k2">{</span></td></tr><tr><td class="number">10</td><td>     <a href="http://www.allegro.cc/manual/set_trans_blender" target="_blank"><span class="a">set_trans_blender</span></a><span class="k2">(</span><span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span>, <span class="n">128</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">11</td><td>     <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>,tela, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">12</td><td>     esperar<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td>     <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>,tela, <span class="n">0</span>, <span class="n">0</span>, <span class="n">255</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>     esperar<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td>     <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>,tela, <span class="n">0</span>, <span class="n">0</span>, <span class="n">255</span>, <span class="n">255</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">16</td><td>     esperar<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">17</td><td>     <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>,tela, <span class="n">0</span>, <span class="n">0</span>, <span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td>     esperar<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">19</td><td>     <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>,tela, <span class="n">0</span>, <span class="n">0</span>, <span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span>, <span class="n">255</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">20</td><td>     </td></tr><tr><td class="number">21</td><td>     <a href="http://www.allegro.cc/manual/set_trans_blender" target="_blank"><span class="a">set_trans_blender</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">128</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">22</td><td>&#160;</td></tr><tr><td class="number">23</td><td>     APEG_STREAM <span class="k3">*</span>stream <span class="k3">=</span> apeg_open_stream<span class="k2">(</span><span class="s">"musini.ogg"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">24</td><td>     </td></tr><tr><td class="number">25</td><td>     pisca<span class="k2">(</span>data, tela, <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>astro<span class="k2">]</span>.dat, <span class="n">4</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">26</td><td>     esperar<span class="k2">(</span><span class="n">2</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">27</td><td>     pisca<span class="k2">(</span>data, tela, <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>muri<span class="k2">]</span>.dat, <span class="n">4</span><span class="k2">)</span><span class="k2">;</span>     </td></tr><tr><td class="number">28</td><td>     esperar<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">29</td><td>     <span class="k1">while</span><span class="k2">(</span>co <span class="k3">&lt;</span> <span class="n">255</span><span class="k2">)</span></td></tr><tr><td class="number">30</td><td>     <span class="k2">{</span></td></tr><tr><td class="number">31</td><td>      esperar<span class="k2">(</span><span class="n">1</span><span class="k3">/</span><span class="n">30</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">32</td><td>      co<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">33</td><td>      co<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">34</td><td>      <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span>tela, <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>apre<span class="k2">]</span>.dat, <span class="n">250</span>, <span class="n">225</span>, co, co, co, co<span class="k2">)</span><span class="k2">;</span>  </td></tr><tr><td class="number">35</td><td>      <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>tela, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">640</span>, <span class="n">480</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>      clear<span class="k2">(</span>tela<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">37</td><td>     <span class="k2">}</span></td></tr><tr><td class="number">38</td><td>     esperar<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">39</td><td>     <span class="k1">while</span><span class="k2">(</span>co <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span></td></tr><tr><td class="number">40</td><td>     <span class="k2">{</span></td></tr><tr><td class="number">41</td><td>      esperar<span class="k2">(</span><span class="n">1</span><span class="k3">/</span><span class="n">30</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">42</td><td>      co--<span class="k2">;</span></td></tr><tr><td class="number">43</td><td>      co--<span class="k2">;</span></td></tr><tr><td class="number">44</td><td>      <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span>tela, <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>apre<span class="k2">]</span>.dat, <span class="n">250</span>, <span class="n">225</span>, co, co, co, co<span class="k2">)</span><span class="k2">;</span>  </td></tr><tr><td class="number">45</td><td>      <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>tela, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">640</span>, <span class="n">480</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">46</td><td>      clear<span class="k2">(</span>tela<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">47</td><td>     <span class="k2">}</span></td></tr><tr><td class="number">48</td><td>     esperar<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">49</td><td>     <span class="k1">while</span><span class="k2">(</span>co <span class="k3">&lt;</span> <span class="n">255</span><span class="k2">)</span></td></tr><tr><td class="number">50</td><td>     <span class="k2">{</span></td></tr><tr><td class="number">51</td><td>       esperar<span class="k2">(</span><span class="n">1</span><span class="k3">/</span><span class="n">30</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">52</td><td>       co<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">53</td><td>      <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span>tela,<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>abat<span class="k2">]</span>.dat, <span class="n">0</span>, <span class="n">0</span>, co, co, co, co<span class="k2">)</span><span class="k2">;</span>  </td></tr><tr><td class="number">54</td><td>      <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>tela, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">640</span>,<span class="n">480</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">55</td><td>      clear<span class="k2">(</span>tela<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">56</td><td>     <span class="k2">}</span></td></tr><tr><td class="number">57</td><td>     esperar<span class="k2">(</span><span class="n">4</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">58</td><td>     <span class="k1">while</span><span class="k2">(</span>co <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span></td></tr><tr><td class="number">59</td><td>     <span class="k2">{</span></td></tr><tr><td class="number">60</td><td>      <span class="k1">int</span> voice <span class="k3">=</span> apeg_get_stream_voice<span class="k2">(</span>stream<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">61</td><td>      <a href="http://www.allegro.cc/manual/voice_set_volume" target="_blank"><span class="a">voice_set_volume</span></a><span class="k2">(</span>voice, co<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">62</td><td>      <a href="http://www.allegro.cc/manual/adjust_sample" target="_blank"><span class="a">adjust_sample</span></a><span class="k2">(</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/SAMPLE" target="_blank"><span class="a">SAMPLE</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>musini<span class="k2">]</span>.dat, co, <span class="n">128</span>, <span class="n">1000</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">63</td><td>      esperar<span class="k2">(</span><span class="n">1</span><span class="k3">/</span><span class="n">30</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">64</td><td>      co--<span class="k2">;</span></td></tr><tr><td class="number">65</td><td>      <a href="http://www.allegro.cc/manual/draw_gouraud_sprite" target="_blank"><span class="a">draw_gouraud_sprite</span></a><span class="k2">(</span>tela,<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span><span class="k2">)</span>data<span class="k2">[</span>abat<span class="k2">]</span>.dat, <span class="n">0</span>, <span class="n">0</span>, co, co, co, co<span class="k2">)</span><span class="k2">;</span>  </td></tr><tr><td class="number">66</td><td>      <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>tela, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">0</span>,<span class="n">640</span>,<span class="n">480</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">67</td><td>      clear<span class="k2">(</span>tela<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">68</td><td>     <span class="k2">}</span></td></tr><tr><td class="number">69</td><td>     esperar<span class="k2">(</span><span class="n">1</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">70</td><td>     </td></tr><tr><td class="number">71</td><td>     apeg_close_stream<span class="k2">(</span>stream<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">72</td><td>     stream <span class="k3">=</span> NULL<span class="k2">;</span></td></tr><tr><td class="number">73</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>

The song must be played since the:</p><p>APEG_STREAM *stream = apeg_open_stream(&quot;musini.ogg&quot;);</p><p>until the last lines.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Fri, 25 Nov 2005 03:08:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You&#39;re not calling apeg_advance_stream anywhere. You need to call it regularly or else it won&#39;t get a new batch of samples to the card in time.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 25 Nov 2005 06:17:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I know. But I don&#39;t know where I should use it. <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" /><br />If I use in all the &quot;while&quot; functions, the wait function will cut the song.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Fri, 25 Nov 2005 06:38:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>options:<br />(1) You can call apeg_advance_stream in the wait function as well.<br />(2) You can use a separate thread to play the music.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Fri, 25 Nov 2005 10:53:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>or:<br />(3) redesign the loop so it allows for what you need to do.</p><p>Also, the esperar(1/30) call isn&#39;t going to do anything. 1/30 = 0 to an int, so you&#39;re waiting 0 seconds (call clock(), call clock() again, and see that enough time has passed, and return immediately).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 25 Nov 2005 13:31:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
(2) You can use a separate thread to play the music.
</p></div></div><p>
How?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
(3) redesign the loop so it allows for what you need to do.
</p></div></div><p>
How?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Fri, 25 Nov 2005 17:12:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How to redesign the loop ?<br />You&#39;ve got all the information in the previous posts, I think. You&#39;ve just got to read it and <b>understand</b> it.<br />What you&#39;ve done here is just copy code. You can do what you want by just modifying that code. The changes you need to make are unrelated to the apeg code, it&#39;s just adding your image drawing code, so you should have all the tools you need to do it yourself.</p><p>Start with the last loop that works for you, and think about where you can draw things without breaking the sound. If you <b>know</b> why the sound doesn&#39;t break with that particular loop, then you&#39;ll see how easy it is to add the draw code. But, for this, you need to <b>understand</b> why this loop works and some others you&#39;ve tried do not. When you&#39;ve understood this, if you don&#39;t already, you&#39;ll find it much easier to continue your program without breaking the sound play (or other things).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (vpenquerch)</author>
		<pubDate>Fri, 25 Nov 2005 17:51:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In real I didn&#39;t understand how you can play a song using the &quot;if&quot; function. You are not sending a command, but just checking it. The command should come in &quot;{}&quot;, after the &quot;if()&quot;.At least this is what I know about the &quot;if&quot; function.</p><p>But I liked the 2nd option, about a new thread, looks like very useful. But I have no idea about how to do it. <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Fri, 25 Nov 2005 19:09:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>if() isn&#39;t a function, it&#39;s something the compiler uses to branch code. You call apeg_advance_stream(stream, TRUE) in the if check, which the compiler knows to call that function and then check its return value against APEG_OK (and then gives the if() &quot;command&quot; a true or false value based on the comparison that&#39;s used to determine whether to execute the following code block or not).</p><p>It would be easy to rewrite your main loops to call apeg&#39;s polling function, however it&#39;s your code, and I don&#39;t know what your ultimate goal is. You&#39;re the one most qualified to modify it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 25 Nov 2005 19:36:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Got it! Thanks! <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>(But I am still curious about the &quot;2nd thread&quot;. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /> Does anyone know a tutorial about it?)</p><p>--------------------------------</p><p>EDIT:</p><p>Errrrr. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>How to use the</p><p><span class="source-code"><span class="k1">if</span><span class="k2">(</span>apeg_advance_stream<span class="k2">(</span>stream, TRUE<span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> APEG_OK<span class="k2">)</span></span></p><p>while showing this dialog:</p><div class="source-code snippet"><div class="inner"><pre>     <a href="http://www.allegro.cc/manual/DIALOG" target="_blank"><span class="a">DIALOG</span></a> dlg<span class="k2">[</span><span class="k2">]</span> <span class="k3">=</span>
     <span class="k2">{</span>
     <span class="c">/* (proc)      (x)  (y)  (w)  (h) (fg) (bg)      (key) (flags) (d1) (d2) (dp)                        (dp2) (dp3) */</span>
     <span class="k2">{</span> <a href="http://www.allegro.cc/manual/d_box_proc" target="_blank"><span class="a">d_box_proc</span></a>,  <span class="n">170</span>, <span class="n">215</span>, <span class="n">300</span>, <span class="n">50</span>, <span class="n">0</span>,   <span class="n">16777215</span>, <span class="n">0</span>,    <span class="n">0</span>,      <span class="n">0</span>,   <span class="n">0</span>,   NULL,                       NULL, NULL <span class="k2">}</span>,
     <span class="k2">{</span> <a href="http://www.allegro.cc/manual/d_text_proc" target="_blank"><span class="a">d_text_proc</span></a>, <span class="n">180</span>, <span class="n">225</span>, <span class="n">250</span>, <span class="n">20</span>, <span class="n">0</span>,   <span class="n">16777215</span>, <span class="n">0</span>,    <span class="n">0</span>,      <span class="n">0</span>,   <span class="n">0</span>,   <span class="k2">(</span><span class="k1">void</span><span class="k3">*</span><span class="k2">)</span><span class="s">"Escreva o código para carregar:"</span>, NULL, NULL <span class="k2">}</span>,
     <span class="k2">{</span> <a href="http://www.allegro.cc/manual/d_edit_proc" target="_blank"><span class="a">d_edit_proc</span></a>, <span class="n">180</span>, <span class="n">245</span>, <span class="n">250</span>, <span class="n">20</span>, <span class="n">0</span>,   <span class="n">16777215</span>, <span class="n">0</span>,    D_EXIT,<span class="n">20</span>,   <span class="n">0</span>,   <span class="k2">(</span><span class="k1">void</span><span class="k3">*</span><span class="k2">)</span>the_code,            NULL, NULL <span class="k2">}</span>,
     <span class="k2">{</span> NULL,        <span class="n">0</span>,   <span class="n">0</span>,   <span class="n">0</span>,   <span class="n">0</span>,  <span class="n">0</span>,   <span class="n">0</span>,        <span class="n">0</span>,    <span class="n">0</span>,      <span class="n">0</span>,   <span class="n">0</span>,   NULL,                       NULL, NULL <span class="k2">}</span>
     <span class="k2">}</span><span class="k2">;</span>
     <a href="http://www.allegro.cc/manual/do_dialog" target="_blank"><span class="a">do_dialog</span></a><span class="k2">(</span>dlg, <span class="n">2</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sun, 27 Nov 2005 03:42:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You could make it a gui item like clock proc in excustom.c (see your allegro examples folder), and then call apeg_advance_stream when your procedure recieves MSG_DRAW and/or MSG_IDLE messages.</p><p>As to the second thread stuff, for portable code you could use a pthreads library for windows, and for nonportable code you could use windows threads; pthreads has a tutorial here: [url <a href="http://www.cs.nmsu.edu/~jcook/Tools/pthreads/pthreads.html">http://www.cs.nmsu.edu/~jcook/Tools/pthreads/pthreads.html</a>] and windows threads has a tutorial here: [url <a href="http://www.flipcode.com/articles/article_multithreading.shtml">http://www.flipcode.com/articles/article_multithreading.shtml</a>]</p><p>pthreads code might look like this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">void</span> <span class="k3">*</span>playfunc<span class="k2">(</span><span class="k1">void</span> <span class="k3">*</span>s<span class="k2">)</span>
<span class="k2">{</span>
   <span class="k1">while</span> <span class="k2">(</span>apeg_advance_stream<span class="k2">(</span><span class="k2">(</span>APEG_STREAM <span class="k3">*</span><span class="k2">)</span>s, TRUE<span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span> APEG_OK<span class="k2">)</span> <span class="k2">{</span><span class="k2">}</span>
   <span class="k1">return</span> NULL<span class="k2">;</span>
<span class="k2">}</span>
<span class="c">// and later, in main, to start the music:</span>
pthread_t music<span class="k2">;</span>
pthread_create <span class="k2">(</span><span class="k3">&amp;</span>music, NULL, playfunc, stream<span class="k2">)</span><span class="k2">;</span>

<span class="c">// and later if you want to wait for the music to end:</span>
pthread_join<span class="k2">(</span>music, NULL<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Sun, 27 Nov 2005 04:03:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I saw that:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">void</span> esperar<span class="k2">(</span><span class="k1">int</span> x<span class="k2">)</span> <span class="c">//esperar = to wait</span>
<span class="k2">{</span>
     clock_t start_time, cur_time<span class="k2">;</span>
         start_time <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_103.html" target="_blank">clock</a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
         <span class="k1">while</span><span class="k2">(</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_103.html" target="_blank">clock</a><span class="k2">(</span><span class="k2">)</span> <span class="k3">-</span> start_time<span class="k2">)</span> <span class="k3">&lt;</span> x <span class="k3">*</span> CLOCKS_PER_SEC<span class="k2">)</span><span class="k2">{</span><span class="k2">}</span>
<span class="k2">}</span>

...

esperar<span class="k2">(</span><span class="n">1</span><span class="k3">/</span><span class="n">30</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

This isn&#39;t good. It will pass zero to esperar() because the parameter is an int. You should do that:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">void</span> esperar<span class="k2">(</span><span class="k1">float</span> x<span class="k2">)</span> <span class="c">//esperar = to wait</span>
<span class="k2">{</span>
     clock_t start_time, cur_time<span class="k2">;</span>
         start_time <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_103.html" target="_blank">clock</a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
         <span class="k1">while</span><span class="k2">(</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_103.html" target="_blank">clock</a><span class="k2">(</span><span class="k2">)</span> <span class="k3">-</span> start_time<span class="k2">)</span> <span class="k3">&lt;</span> <span class="k2">(</span><span class="k1">int</span><span class="k2">)</span> <span class="k2">(</span>x <span class="k3">*</span> CLOCKS_PER_SEC<span class="k2">)</span><span class="k2">)</span><span class="k2">{</span><span class="k2">}</span>
<span class="k2">}</span>

...

esperar<span class="k2">(</span><span class="n">1</span>.<span class="n">0</span><span class="k3">/</span><span class="n">30</span>.<span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>


EDIT: Didn&#39;t read all the replies. Looks like Kitty Cat already said that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Victor Williams Stafusa da Silva)</author>
		<pubDate>Sun, 27 Nov 2005 05:43:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Didn&#39;t read all the replies. Looks like Kitty Cat already said that.
</p></div></div><p>

Thanks anyway. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>Thanks Zaphos, I will try that when I get some free time.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Martano)</author>
		<pubDate>Sun, 27 Nov 2005 09:06:48 +0000</pubDate>
	</item>
</rss>
