|
DUMB and allegro5 |
amarillion
Member #940
January 2001
|
I'm still working on my project of upgrading my old games to Allegro 5, and I've worked around the problem with datafiles. So the next hurdle is DUMB. Is anybody using it with Allegro 5? I've checked out the recent fork on github, but its README is out of date, and there doesn't seem to be a CMAKE option to build the A5 version -- |
beoran
Member #12,636
March 2011
|
Yes, I use DUMB with Allegro and I found it rather easy to get DUMB to compile on Linux or Mingw, even without cmake. One point is that you have to (counterintuitively) disable support for Allegro in DUMB. That support is for Allegro 4.x and isn't needed for Allegro 5.x. |
amarillion
Member #940
January 2001
|
Great. I managed to compile the latest dumb from github. So you just compile with -ldumb and it works with a5? But how do you connect DUMB to allegro 5's new audio functions? Is there a code sample somewhere? -- |
beoran
Member #12,636
March 2011
|
If DUMB is compiled in properly then you should just do al_init_audio_addon and al_init_acodec_addon, to get started. You then you just load a .xm, .it, .mod or .s3m music file using al_load_audio_stream, and play that in the usual way. |
Thomas Fjellstrom
Member #476
June 2000
|
amarillion said: But how do you connect DUMB to allegro 5's new audio functions? Is there a code sample somewhere? What beoran said. And in addition, the acodec addon has a built in support for dumb. -- |
Bruce Perry
Member #270
April 2000
|
As I recall, kode54's version of DUMB (if that's the one you mean) changed DUMB's file interface to include a seek function. The trouble then is that Allegro 5 implements the interface and doesn't include that function, so compatibility is broken. Probably fairly easy to patch as long as you know about it... It's all a bit of a mess. Sorry -- |
amarillion
Member #940
January 2001
|
Ok this is weird. I compiled kode54's version with cmake ..., make, make install. Then I updated my allegro 5 game, replaced DUH* with ALLEGRO_AUDIO_STREAM*, load a mod file with al_load_audio_stream, create a voice, and call al_attach_audio_stream_to_voice. Great, it works! I hear music playing. And then I remember that I forgot to update the makefile to link with -ldumb. Wait, what? So does that mean that Allegro has dumb statically linked in? I must have had an old version of dumb installed when I compiled allegro. -- |
beoran
Member #12,636
March 2011
|
On Linux you can use the ldd and nm tool to inspect the symbols of the Allegro libraries. On other platforms there must be similar tools to inspect your libraries with. Like that you can find out where the DUMB you are using is coming from. |
amarillion
Member #940
January 2001
|
Yep, there it is (line 4). All of this was a lot easier than I expected, allegro 5 is breeze! 1ldd /usr/local/lib/liballegro_acodec-debug.so.5.0
2 linux-vdso.so.1 => (0x00007fff17b4d000)
3 liballegro_audio-debug.so.5.0 => /usr/local/lib/liballegro_audio-debug.so.5.0 (0x00007f8e2d801000)
4 libdumb.so.1 => /usr/lib/x86_64-linux-gnu/libdumb.so.1 (0x00007f8e2d5cd000)
5 libvorbisfile.so.3 => /usr/lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007f8e2d3c4000)
6 liballegro-debug.so.5.0 => /usr/local/lib/liballegro-debug.so.5.0 (0x00007f8e2d04b000)
7 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8e2cc86000)
8 libpulse-simple.so.0 => /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0 (0x00007f8e2ca81000)
9 libpulse.so.0 => /usr/lib/x86_64-linux-gnu/libpulse.so.0 (0x00007f8e2c838000)
10 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8e2c532000)
11 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8e2c313000)
12 libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f8e2c0e6000)
13 libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f8e2bedd000)
14 libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f8e2bba7000)
15 libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f8e2b99d000)
16 libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f8e2b79a000)
17 libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f8e2b58f000)
18 libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f8e2b329000)
19 /lib64/ld-linux-x86-64.so.2 (0x00007f8e2dc4e000)
20 libpulsecommon-4.0.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-4.0.so (0x00007f8e2b0c1000)
21 libjson-c.so.2 => /lib/x86_64-linux-gnu/libjson-c.so.2 (0x00007f8e2aeb6000)
22 libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f8e2ac71000)
23 libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f8e2aa51000)
24 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8e2a84d000)
25 libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f8e2a643000)
26 libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f8e2a43c000)
27 libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f8e2a22a000)
28 libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f8e2a003000)
29 libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f8e29dff000)
30 libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f8e29bfd000)
31 libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f8e299e6000)
32 libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f8e297e0000)
33 libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f8e295dd000)
34 libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f8e293da000)
35 libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f8e291d3000)
36 libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f8e28fd1000)
37 libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f8e28dcb000)
38 libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f8e28bbe000)
39 libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007f8e289b4000)
40 libsndfile.so.1 => /usr/lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f8e2874c000)
41 libasyncns.so.0 => /usr/lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007f8e28545000)
42 librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8e2833d000)
43 libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f8e28139000)
44 libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f8e27f32000)
45 libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f8e27d18000)
46 libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f8e27ae6000)
47 libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f8e27617000)
48 libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f8e273fc000)
-- |
Peter Hull
Member #1,136
March 2001
|
It's in here: I admit, I didn't realise this before. Nice one, Allegro devs! Pete
|
|