Skip to content
  • Jan Holthuis's avatar
    Implement audio backend system · e3f1784a
    Jan Holthuis authored
    This makes it possible to have multiple audio backends compiled into
    reicast (e.g. ALSA & OSS on Linux). These can then selected by the user
    via a config option ("backend" iin the "audio" section). It *should*
    also be possible to reduce the number of platform-specific ifdefs with this
    approach.
    
    Audio backends need to define a struct (audiobackend_t) that holds a
    pointer to it's init, push and term function and also a slug and a name
    as string. They then need to pass a pointer to this struct to
    RegisterAudioBackend() before InitAudio() is called.
    
    For now, I defined a function (RegisterAllAudioBackends) that get's
    called exactly once (i.e. upon first call of InitAudio()), where
    we can put ifdef'd RegisterAudioBackend() calls into for each backend
    that reicast supports.
    
    Please note that this commit just implements the basic audio backend
    system - no backends have been ported to the new API yet. For the meantime,
    reicast will run without any audio support accross all systems.
    e3f1784a