Subject: UADE on Mac OSX using libAO and ESD

From: syntheticsw
Date: Fri Apr 14 21:27:10 2006

To: UADE-Developer-discussion
When using UADE on Mac OSX PPC i get the following error :

&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;

c3b3bee2:~/code/uade/uade-2.02 wizard$ make soundcheck

### UADE should be playing now 'AHX.Cruisin'

src/frontends/uade123/uade123 --basedir=. -S amigasrc/score/score -P players/AbyssHighestExperience -m songs/AHX.Cruisin -u src/uadecore
dyld: lazy symbol binding failed: Symbol not found: _dlsym_auto_underscore
  Referenced from: /usr/local/lib/libao.2.dylib
  Expected in: flat namespace

dyld: Symbol not found: _dlsym_auto_underscore
  Referenced from: /usr/local/lib/libao.2.dylib
  Expected in: flat namespace

make: *** [soundcheck] Trace/BPT trap
c3b3bee2:~/code/uade/uade-2.02 wizard$ uadecore: No more songs to play.

c3b3bee2:~/code/uade/uade-2.02 wizard$ 

&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;

On the inet i found that there is a problem between libAO and esd
of some kind on OSX. Is there any chance for getting a SDL audiodriver
into UADE123 ?

---

From: mld/uade team
Date: Fri Apr 14 23:12:59 2006

To: UADE-Developer-discussion
the error kind of looks familiar...

wait a sec... ah, ok... someone reported somethin similar with uade 150 -&gt; http://board.kohina.net/viewtopic.php?t=738&amp;start=0

Seems there's a difference between libao from fink and from Darwin ports. Since I don't own a mac I have no clue in what respect and how vlice fixed it.

anyone with a mac out there?

---

From: shd
Date: Thu Apr 20 20:25:37 2006

To: UADE-Developer-discussion
[quote:37d1706755="syntheticsw"]
On the inet i found that there is a problem between libAO and esd
of some kind on OSX. Is there any chance for getting a SDL audiodriver
into UADE123 ?[/quote:37d1706755]

Not very useful. libao has to be fixed anyway.

---

From: spot
Date: Thu Feb 28 01:37:17 2008

To: UADE-Developer-discussion
is there an SDL audio driver now?
i'd appreciate it for sure!

---

From: shd
Date: Thu Feb 28 09:05:58 2008

To: UADE-Developer-discussion
[quote:91e9c4825f="spot"]is there an SDL audio driver now?
i'd appreciate it for sure![/quote:91e9c4825f]
Don't know. If libao doesn't work, an SDL driver can be implemented into uade123. I accept patches, the only thing that needs to be done is modularize src/frontends/uade123/audio.c.

---

From: spot
Date: Mon Mar 3 01:04:15 2008

To: UADE-Developer-discussion
i cant code, but sdl is more available on different platforms than libao.
so it would be a good move i think.
an sdl gui would be cool too, for ports to handhelds etc..

---

From: spot / up rough
Date: Wed Mar 5 00:28:24 2008

To: UADE-Developer-discussion
well, now libao is ported to AmigaOS 4.0 so I am one step closer to having UADE compiled. There's a fork and some sighandling stuff in the uade123 gui that is giving me problems ATM though, as we don't have fork on AOS.

I am gonna have a new go at it tomorrow, wish me luck!

---

From: shd
Date: Wed Mar 5 21:45:21 2008

To: UADE-Developer-discussion
[quote:1e5c3c47dc="spot / up rough"]There's a fork and some sighandling stuff in the uade123 gui that is giving me problems ATM though, as we don't have fork on AOS.[/quote:1e5c3c47dc]

The fork itself is not really a problem. What you want to do is execute uadecore but have a bidirectional pipe between uade123 and uadecore.

You can pretty much ignore all the signal stuff to get the uade123 working. You can remove all signal handling initially. That code is almost non-functional. It is not needed for anything else but ctrl-c.

---

From: spot
Date: Sat Mar 8 03:04:43 2008

To: UADE-Developer-discussion
OK minus the sigact problems, that i will try to remove, these remain;

unixsupport.c: In function 'uade_arch_spawn':
unixsupport.c:268: warning: implicit declaration of function 'socketpair'
unixsupport.c:273: warning: implicit declaration of function 'fork'
unixsupport.c:284: warning: implicit declaration of function 'sysconf'
unixsupport.c:284: error: '_SC_OPEN_MAX' undeclared (first use in this function)

in a discussion here: http://utilitybase.com/forum/index.php?action=vthread&amp;forum=2&amp;topic=1260&amp;page=-1#19

this was said &quot;There is _POSIX_OPEN_MAX in &lt;limits.h&gt;. This looks like it could be the same as OPEN_MAX.&quot;

do you think that could work as intended?

---

From: shd
Date: Sat Mar 8 10:26:40 2008

To: UADE-Developer-discussion
[quote:1ea2d45aa4="spot"]OK minus the sigact problems, that i will try to remove, these remain;

unixsupport.c: In function 'uade_arch_spawn':
unixsupport.c:268: warning: implicit declaration of function 'socketpair'
[/quote:1ea2d45aa4]
What we actually need is a file object or two that can be used to communicate in both directions. frontend &lt;&gt; uadecore

[quote:1ea2d45aa4]
[/quote:1ea2d45aa4]

We don't actually need fork(). vfork() is sufficient, but small modifications are needed to that function so that AmigaOS doesn't break it. On eshould not change any variable after vfork().

[quote:1ea2d45aa4]

do you think that could work as intended?[/quote:1ea2d45aa4]
You can kill this code on AOS, it is not needed:
[code:1:1ea2d45aa4]
   int fd;
    int maxfds;

    if &#40;&#40;maxfds = sysconf&#40;_SC_OPEN_MAX&#41;&#41; &lt; 0&#41; &#123;
      maxfds = 1024;
      fprintf&#40;stderr, &quot;Getting max fds failed. Using %d.\n&quot;, maxfds&#41;;
    &#125;

    /* close everything else but stdin, stdout, stderr, and in/out fds */
    for &#40;fd = 3; fd &lt; maxfds; fd++&#41; &#123;
      if &#40;fd != fds&#91;1&#93;&#41;
	atomic_close&#40;fd&#41;;
    &#125;
[/code:1:1ea2d45aa4]