Sign in to follow this  
  • entries
    3
  • comment
    1
  • views
    3546

Audio Framework Update: Devices and effects

Sign in to follow this  
Aressera

910 views

I've been making more progress on the audio library I'm developing. The main things I've finished in the last few days have been the WASAPI device interface code for the windows version, as well as a compressor/limiter effect.

For background, my audio library exposes a simple interface for accessing the available audio devices connected to a system.

_____________________________________________________________________________

While implementing an interface to Apple's Core Audio device system was fairly painless and robust, using WASAPI on windows has been painful. Even having followed the documentation closely, I still had trouble getting everything to work as expected.

The exclusive/shared mode tradeoff is ridiculous (OS X has no such thing). The result is that multi-channel audio devices can't expose any more channels in shared mode than are configured in the control panel (i.e. for stereo, surround). I had heard that WASAPI was more pro-audio friendly, but it doesn't seem to allow true multi-track recording or playback in anything other than exclusive mode. The problem with exclusive mode is that it doesn't allow any other applications access to the device - a big no-no if you're trying to get your app to play nice with the rest of the system.

It looks like I will be forced to add an ASIO layer to the windows code in order to allow non-intrusive multitracking on systems with ASIO drivers installed.

The other major hurdle in adding device support was dealing with device events - mainly detecting when a device is disconnected or connected or when the default device is changed. For instance, I have a class called DefaultSoundDevice which automatically keeps track of the current default system input and output devices and switches to the proper device if it is changed in the system control panel.

The next thing that I have to handle is detecting the semantic usage of each output channel and forwarding this info to the client - what speaker does each channel correspond to? This way surround and other configurations are sure that they are getting the correct channels.

_____________________________________________________________________________

Finally, I finished implementing a full-featured compressor/limiter in the DSP framework I am developing. It has all of the standard controls: threshold, ratio, attack, release, makeup gain, plus a few less-standard ones: variable soft knee, variable-length RMS peak-sensing window, and input gain.

I've also finished WAVE file encoding/decoding, OGG file decoding (encoding to come), and a few utility classes that handle file recording/playback.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now