Sound configuration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nurak
    Rookie
    • Apr 2008
    • 3

    Sound configuration

    Hi,

    I've just migrated from 3.0.6 on Windows to 3.0.9b on Mac OSX. Unfortunately, I can't seem to get my sound configuration to work. I've made some edits that worked fine on Windows, changing some of the sound around for my taste (first step, get rid of kill.wav)...No matter what, the game does not seem to read my sound.cfg file from before. I've tried converting it from DOS to Unix line endings but it doesn't seem to matter. From what I've gathered from the source code it belongs in lib/xtra/sound but I guess that's not correct. Anyone else have this problem?

    Thanks,
    Russ
  • Lebannen
    Apprentice
    • Apr 2008
    • 61

    #2
    The sound files themselves are stored within the app package (select application in Finder, File -> Show Package Contents, then Contents/Resources/lib/xtra/sound/ ). I don't think there's a sound.cfg on the mac though - what kind of things does that allow? Reassigning sounds to different actions?

    But having just tried sound on trunk, 3.0.9 and 3.0.8, I couldn't get sound to work at all on my Mac. Could you get anything to play at all?

    Comment

    • Dragonboneman
      Adept
      • Aug 2007
      • 182

      #3
      Older Mac versions had sound which was completely different from the PC - I played V3.0.5 on an old iMac a few times and remember it had bits of music from the soundtrack to Excalibur, possibly an extract from Carl Orff's Carmina Burana, on the tombstone screen for instance. I liked that soundset better than the one that comes with the current PC version.

      Comment

      • nurak
        Rookie
        • Apr 2008
        • 3

        #4
        The sounds are in lib/xtra/sound but there is no sound.cfg. However the sounds play using the default settings found in the baseline version of sound.cfg. For example, if I delete kill.wav, no sound is played when I kill something.
        This leads me to believe that the sound.cfg information is there somewhere, but where??

        The sound.cfg file does allow you to assign sounds to many more events than are set by default. For example, I had this line in my old one:
        hit_hi_great = SOUND181.WAV
        This plays a sound from MS Pinball (yes, MS Pinball...) when you get a *GREAT* hit. You can assign a sound to each level of hit, but the baseline does not so they all sound the same. I also put 5 different sounds in for the normal "hit" so it's not so monotonous. Little things like that have made my hours and hours of Angband just a bit more entertaining...

        Comment

        • Lebannen
          Apprentice
          • Apr 2008
          • 61

          #5
          Just to let you know, I'm poking at the mac sound code following your mention of it. By the look of it, there is no .cfg file controlling which sounds get played (although the code was written for one at one point!), while it's waiting on a nicer solution. The current solution relies on matching sounds by looking at the filenames - so to get your HIT_HI_GREAT sound, drop in a hit_hi_great.wav file into the directory and it'll get played!

          I quite like the simplicity of this solution without resorting to .cfg files (the "mac-like" solution would be to use a .plist, and they're nice but fairly verbose...) so I'm thinking of extending it further to allow, in future, hit_hi_great.wav, hit_hi_great.mp3 and hit_hi_great1.wav type matching. This would give multiple sound format support, and randomly choose between all available files for a bit of variation. I'll try and land it by 3.1.0.

          Comment

          • nurak
            Rookie
            • Apr 2008
            • 3

            #6
            Great news!!

            Thanks for looking at that; sometimes I find navigating all of C's #defines and #ifdefs more daunting than the pits of Angband themselves...

            The filename matching definitely sounds easier and cleaner than the .cfg file. The randomizing would be great too, taking care of my other complaint. Perhaps when your solution is in place all the event names can be listed in a text file (or online help) so the casual non-source-code-reading player can figure it out...

            It would be especially good if there were some way to standardize this across platforms. My laptop is still Windows and Linux, for example. Formats like mp3 would be cool, but I don't know if there is a true cross-platform solution for it, one that could be safely (license-wise) bundled with the game...But sox (LGPL) supports most of the pre-mpeg formats and could be a good choice.

            Anyway, thanks for the info, and I'll be looking forward to 3.1.0!

            Cheers,
            Russ

            Comment

            • takkaria
              Veteran
              • Apr 2007
              • 1951

              #7
              Originally posted by Lebannen
              Just to let you know, I'm poking at the mac sound code following your mention of it. By the look of it, there is no .cfg file controlling which sounds get played (although the code was written for one at one point!), while it's waiting on a nicer solution. The current solution relies on matching sounds by looking at the filenames - so to get your HIT_HI_GREAT sound, drop in a hit_hi_great.wav file into the directory and it'll get played!

              I quite like the simplicity of this solution without resorting to .cfg files (the "mac-like" solution would be to use a .plist, and they're nice but fairly verbose...) so I'm thinking of extending it further to allow, in future, hit_hi_great.wav, hit_hi_great.mp3 and hit_hi_great1.wav type matching. This would give multiple sound format support, and randomly choose between all available files for a bit of variation. I'll try and land it by 3.1.0.
              I would recommend that instead of doing that, you just use the already-existing code in snd-sdl.c for reading in the sound.cfg file. Making sound use different mechanisms per platform seems like a maintenance nightmare to me...
              takkaria whispers something about options. -more-

              Comment

              Working...
              😀
              😂
              🥰
              😘
              🤢
              😎
              😞
              😡
              👍
              👎