Jump to content

mtkaz

Community Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by mtkaz

  1. I'm writing what I found regarding OpenAL issues of Mac OS X and wish it will be hints for somebody.

    I couldn't understand how to loop sound. Certainly the loop flag is set to the sound source but the program looks it unqueue the buffers which are processed, and then delete them. Anyway, it causes an error on Mac OS X. If you set the loop flag, you can't unqueue the buffers. This is the reason for the error of alSourceUnqueueBuffers() in vsrc_deque_finished_bufs(). In this case, avoidance is quite simple. I mean, we don't need to call alSourceUnqueueBuffers() when the loop flag is set.

    A second issue is big. It may require to change the sound manager. Apple's OpenAL (on top of Core Audio) is always running in another thread. Stop Sound command (issued by alSourceStop) is queued in the internal queue. This means we can't delete the buffer associated the sound source which we stopped just after calling alSourceStop. There is a delay to stop sound really. The sound manager uses fire-and-forget style. This doesn't match Apple's OpenAL.

  2. When pyrogenesis is started on Mac OS X, a lot of error messages are shown:

    glwprintf failed (buffer size exceeded?) - return value -1, errno 92

    The cause of the message is a error of vswprintf(). I found it can be fixed by setting locale. But setting env. variable like "LC_ALL=en_US.UTF-8" didn't work. It seems that OS X accepted only "C" (perhaps and "POSIX"). So I added the following code in the end of SetDefaultIfLocaleInvalid() in GameSetup.cpp;

    setlocale(LC_ALL , "en_US.utf-8");

    It worked. So far so good. Manual is shown without corruption. I recommend this patch to Mac users.

  3. The role of each Library directories is very clear. But it's nothing to do with this matter. The problem is Premake or Premake script. "clean" section of makefile which Premake generated is:

    -@rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)

    If you misspelled the words, CONFIG or Release, the variables aren' set. They must be null. In this case clean section become:

    rm -rf /

    This command means deleting all files on your system. 'rm' command try to delete files by alphabetical order. So /Applications becomes the first victim. File permission allowed, it delete the file.It's dangerous. I think this doesn't depend on OS X.

  4. I also experienced "make" try to delete files under the root when I made a typo like "make CONFIG=Relese clean". It's not my fault. It had occurred before I modified makefiles. Perhaps the makefiles which Premake generated is not so gentle for user's mistake.

    BTW, Snow Leopard users don't need to use gcc-4.5. TheShadow's error message tells gcc-4.5 is not installed. You don't need the commands (export CC=...) just after update-workspaces.sh.

    P.S. You don't need make "CONFIG=Release clean" if you installed the source code the first time.

  5. Thank you so much for making a mac version, I have been wanting to try this game out for a while. Unfortunately the link doesn't work for me.

    QUOTE

    Forbidden

    You don't have permission to access /wp/english/zeroad

    on this server.

    Would be most grateful if this can be fixed.

    EDIT: I found it here: http://mac.softpedia.com/get/Games/0-A-D.shtml

    This file works fine for me. A bunch of errors appear upon launching a game, but then they go away, and everything seems to work OK (apart from the sound, as mentioned above). Quite laggy for me, but my computer generally seems a bit slow at the moment, so maybe not the game's fault. I have a 17" MacBook Pro 2.93 GHz Core 2 Duo with 8 GB RAM. Tested 0 A.D. with the NVIDIA GeForce 9400M graphics card (250MB), haven't yet tried with the more powerful 9600M GT (512MB). This is the first time I have been able to play this game properly. It is coming along nicely. Maybe this binary could be put up on the main site for download, as I have to say that being told I have to compile the game is quite intimidating.

    Sorry for inconvenience but I needed to deny the access from some domains which spammers used.

    Your Mac is more gorgeous than mine :D I don't care the speed of game for now. Just a alpha-stage.

  6. I was looking into the build system of 0 A.D. gmake, cmake, premake… come on… I don't know I can do that but I will try. The first goal is 32-bit binaries and tailoring the makefiles for OS X.

    I will ask a question or inform you at Development & Technical Discussion board (it looks better).

  7. Nice. I'm a Mac user, and 0 A.D. team member. Would you mind sharing your process for packaging the game so that, if I need to, I'll be able to do it for others.

    Specifically, how did you get it to work with both 32bit and 64bit machines, how did you solve the hard coded system library locations? Did you bundle them in the package?

    Oh, I forgot to mention it was 64 bit binaries. Intel Core Duo users can't use it. But my dylibs built by MacPorts contain 32/64-bit binaries. You can use them for 32-bit pyrogenesis.

    As for packaging, I patched pyrogenesis and dylibs using "install_name_tool" command. "otool -D" command tells us library's ID. I changed it like:

    install_name_tool -id @executable_path/libSDL-1.2.0.dylib libSDL-1.2.0.dylib

    We can confirm what dylib is linked using "otool -L". I modified them like:

    install_name_tool -change /opt/local/lib/libSDL-1.2.0.dylib @executable_path/libSDL-1.2.0.dylib pyrogenesis

    Of course, the better way is changing make files.

  8. Hello and thank you for 0 A.D. I built Alpha 3 on my Intel Mac (OS X 10.6.6) and found a issue related to ticket #685 (OSX Crashes with Audio).

    I tried to change the loop flag to false just before alSource functions. The music had been played without crash in main menu screen.

    I don't have used OpenAL but I think this suggests the loop value should be 0 in the case of main menu. Loop = true means the buffer will be used repeatedly. So alSourceUnqueueBuffers() returned the error. Perhaps OpenAL on another platforms ignore the loop flag (bug?). Is this right?

×
×
  • Create New...