Audio Configuration

These options do not affect the Amiga emulation itself, but will affect how the Amiga audio is played back. Altering these options affect the quality and/or latency of the audio output.

Relevant options: audio_buffer_target_bytes

Audio Buffer Management

FS-UAE uses dynamic buffer management to try and keep the average fill of the audio buffer at a certain point. It indirectly controls the buffer fill by slightly tweaking the playback frequency if the buffer fill grows or shrinks. The playback frequency is determined by a PID controller, so the system is somewhat similar to the way a thermostat or the cruise control of a car works.

The controller is configured so that the changes to the frequency are very small – and the buffer is corrected over time – so you should (hopefully) not be able to hear this. Currently, the PID controller values are hardcoded and can not be configured.

OpenAL Driver Settings

FS-UAE uses OpenAL to output audio. In most cases, the actual OpenAL implementation is OpenAL Soft, and you can tweak the behavior of the audio driver with an OpenAL configuration file. OpenAL can support several audio backends depending on your system.

By creating ~/.alsoftrc, you can configure which audio backend and device OpenAL uses for audio ouput, along with several other options. For example, you can tweak FS-UAE’s internal audio buffering with audio_buffer_target_bytes, but you need to configure OpenAL separately if you want to tweak its internal buffers.

See alsoftrc.sample for documentation.

19 thoughts on “Audio Configuration

  1. Thank you for maintaining this resource. There is a particular game that I played on the Amiga when it was a kid. Im trying to extract the audio effects from the downloaded game from this site. The game is called Flashback: The quest for identity. I think I found the location where the files are stored: fsuae\Hard Drives\data\music but I am unsure what file types these are to attempt extract the audio from the files. I searched online and am having trouble finding any information on this. My purpose is to make a flashback theme for PC desktop for my own personal use. Is there a way to read the effects and music files in order to bring them into a audio editor like audacity to extract some particular sound effects. Thank you.

  2. How can i get surround sound? I tried with following config with no luck:

    [general]
    channels=surround51rear

    Thank you

    • I assume you want stereo duplication to the rear surround speakers? Unfortunately, I’m not familiar with configuring OpenAL soft like that. And FS-UAE itself does not provide specific support for surround speakers either.

  3. I’m now using the latest dev build on Ubuntu with an x86 machine, but for whatever reason, whenever I pick Amiga 4000, I never get sound? It works fine with A1200 etc. Is there something I could be doing wrong?

    • Never, as in no matter what Amiga software you are using? Without more information it is difficult to say what the problem is. It could be you are trying to run a game which isn’t compatible with such as fast Amiga…

      • Yeah I’ve tried various things at various points, but never any sound. It seems I tricked it once, with an older version, by forcing it to use the A1200 rom instead (but can’t say for certain). Usually my go to thing for a sound test is the Polka Bros. Friday at Eight demo.

        Otherwise it’s working great!

        • I think many demos will fail on Amiga 4000 (real ones too), so unless there is a case where sound is known to work on a real high-end Amiga with fast CPU, and doesn’t work in FS-UAE. I’m just going to assume this is “correct behavior”.

          (As a side note, sound does generally work in FS-UAE / A4000, but I only use that combination with software I know is supposed to run well with that configuration. For example music software such as EaglePlayer, or most *WHDLoad* games and demos).

          • Thank you! I’ve been thinking for months now there was just some silly thing I’d configured wrong, but it is indeed the demo I kept trying (and I tried over and over). I went through several things and verified the sound can be hit or miss.

  4. Hi Frode,

    I am having some problems with sound playing on fs-uae on FreeBSD v 10

    I can hear sound but it is quite muffled, not clear at all, like a distortion.
    I have checked the fs-uae log:

    fs_emu_audio_init
    openal_audio_init
    openal device opened:
    openal devices:
    – no support for device enumeration
    openal default device: ‘((sampling-rate 44100) (device ‘(native))
    openal: trying frequency 48000
    openal: created context
    openal: made context current
    openal: number of stereo sources is 8

    As you can see, its as if OpenAL doesnt open any devices at all.

    I have made ~/.alsoftrc and tried every driver (oss,pulse,alsa as device) but no sound, always the same low muffled distorted sound.

    What do you think could be the problem?

    Thank you so much for creating fs-uae, its great, everything else works great! Thanks for allowing me to live my youth again!
    😀

    • OK never-mind i have fixed it with the help of the #openal irc guys.

      When fs-uae is installed it also install’s openal-20060211_12 as a dependency but according to the openal irc guys this is an outdated version. so:

      I pkg delete fs-uae and pkg delete openal
      then pkg install openal-soft, then build fs-uae from source (tried to pkg install fs-uae but pkg would not let me because it could not install openal-20060211_12 due to a clash with openal-soft).

      so I am guessing that the dependency needs to be updated to now use openal-soft.

      Thanks!

      • Hi, and thanks for figuring it out! I’m not the maintainer of the FS-UAE packages in the FreeBSD ports tree, but I have forwarded your findings to the package maintainer so the package can be updated 🙂

  5. Hi! This is just a question out of curiosity…I saw that when building FS-UAE from source, it is necessary to have libSDL. But why?
    As far as I remember, SDL is yet another sound architecture like ALSA or PulseAudio, and thus independent of the last two. Or you might as well say, even though my Ubuntu is working perfectly with PulseAudio (unlike some others), FS-UAE will not utilize it but bake its own cake again.
    Unless I’m wrong…

    P.S. BTW, great job with this emulator! You could say UAE has found its way back to Norway 🙂 The young whippersnappers will no longer remember; but it was actually an university in Norway that hosted the official UAE forum! That is now…17 years ago. I’m not kidding.

    • Yes, you are actually wrong 🙂 SDL isn’t used for audio in FS-UAE but for window management and mouse/keyboard/joystick input. FS-UAE could have used SDL for audio too, but instead it uses OpenAL.

      Btw, comparing SDL to ALSA doesn’t make sense. The point of FS-UAE using OpenAL (and the same point if it had used SDL) is that the same audio code can then be compiled for Linux, Windows, OS X, BSD, etc – instead of having to code for ALSA *and* DirectX *and* CoreAudio (etc). So SDL (audio) isn’t supposed to be *better* than ALSA or PulseAudio (the latter is also a wrapper on top of ALSA), but cross-platform!

      OpenAl will work as a layer on top of ALSA or PulseAudio. If it does not work as you’d like, perhaps you should try to tweak an OpenAL configuration file as briefly described on this page 🙂

      • Thanks for the reply! And I’ll tell you what: I haven’t ever used SDL for anything else than sound! (I even had no idea there is even a point to use it for anything else than that…). That’s why I had to be “wrong” in my argumentation from some point…’by design’.

  6. How to I configure FS-UAE to use JACK for sound output on Ubuntu? It only uses ALSA, which prevents me from hearing sound in other programs. What is the solution?

    • You assume there is a solution, then? Well, fortunately, there may be one. FS-UAE uses OpenAL (OpenAL Soft) for audio output. You can look up the documentation for OpenAL Soft. It should be possible to tweak the audio backend (in ~/.alsoftrc I believe it was).

  7. Hi Frode. I have looked through the docs here but can’t see a way of changing the volume of the amiga sound output (I know I can change the Floppy Volume but that’s different). Is there a Configuration Option or Keyboard Shortcut? Thanks.

    • Hi, there were some new keyboard shortcuts for volume control added in 2.2, but I see I forgot to update the keyboard shortcut docs. They are updated now 🙂 I should also add an option to set the initial volume level.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.