WinampAC3 ver 0.60b

SourceForge Logo
English   Russian  
Download Sourceforge project Project forum Author's homepage


This program is a Winamp 2.x input plugin to play .ac3 files. Based on the same decoder library used in AC3Filter. Distributed absolutely for free (FREEWARE). Sorry if my English is bad, but I think it is better to have something than nothing.

Main features:


Related projects:

    AC3Filter - DirectShow filter for AC3 decoding to play .AVI with AC3 audio tracks and MPEG2 (DVD).
    MatrixMixer - Allows to upmix any audio source (not only ac3s) up to 5.1 format (based on AC3Filter mixing matrix).
    LibA52 - Crossplatform ac3 decoding library (by Michel LESPINASSE).



Contents


Download.

New versions can be found at site:
http://winampac3.sourceforge.net
http://sourceforge.net/projects/winampac3 - sourceforge project page (bug reports, feature requests)
http://sourceforge.net/forum/?group_id=67608 - WinampAC3 forum

All versions:

http://sourceforge.net/projects/winampac3

WinampAC3 ver 0.60b
http://prdownloads.sourceforge.net/winampac3/winampac3_0_60b.exe?download - binary
http://prdownloads.sourceforge.net/winampac3/winampac3_0_60b_src.zip?download - sources



Configuration.

 
   First it is two main rules of tuning:
    1. If you do not understand what some option does do not touch it.
    2. If you did not follow the first rule and broke anything and do not know how to fix it just load 'standart' preset.
    :)))

Main settings

    Here is Main property page (levels and bitstream info are only shown when property page is called from player):



* Bitstream information.

    Top left it is bitstream information (BSI):

* Output.

    Here you can change output configuration.

    First combo box defines sound output device. 'Direct Sound' - is a built-in sound renderer that support SPDIF output. 'Winamp output' - uses Winamp standart output method.

    Second combo box speaker configuration  to wich ac3 channels will be mixed. Note that some output formats may not be supported by ouput device selected. Winamp output can support only a subset of all possible configurations and does not support SPDIF at all. For 'Direct Sound' it is a test performed to detect possible configurations, so if sound card does not support SPDIF it will not be listed. Configuration is shown in form front_channels/surround_channels + subwoofer presence flag (SW). For some configurations common names are given. What is the difference between LFE and subwoofer read in What is LFE? section. 'Dolby Surround/ProLogic' modes mean that that all channels presented in ac3 stream will be mixed into two channels so Dolby Surround/Pro Logic decoder can extract surround channel. 'Dolby ProLogic II' mode is similar to DPL but for DPL II decoder. DPLII support is only experimental because of lack of reliable information. 'SPDIF' mode means that ac3 stream will be routed to digital out of sound card directly and without any modification. So no one of other settings will work if this checkbox is checked.

    'Sample format' combo box sets output sample format. There are PCM 16 bit, 24 and 32 bit and PCM Float formats are now supported. On some sound cards some formats may not work so use this option with care.

* Gain levels.

    Here you can control gain levels.     Master and Gain controls are responsible for global gain level. Master sets desired gain level. If current sound level is too high and overflow occurs then real gain level will be decreased. Current gain level shown at Gain control.

* Dynamic range compression.

    By its nature ac3 is a logarithmic format. Samples are stored in form of exponents and mantissas. In terms of bits one sample can be up to 40bits long (only theoretically) or up to 24bits (normal). It provides huge dynamic range (but, as said by great Einstein all good things in this word are relative :-). This means that quiet sound with low level when played on 16- bit sound card will be not audible at all or will have very low absolute level (=> high distortions). To solve this problem it is dynamic range comression. Main idea is to raise level when sound is quiet (and vice versa when loud) before converting to 16-bit form. There are special markers in ac3 stream for current level change. This markers are set by producer at a mastering stage, so it guarantees high quality. DRC level indicates this level. With Use DRC chekbox you can enabe/disable using DRC. (of course this is only rough problem description).

    DRC Power control adjusts how much DRC level changes sound level. When DRC Power is increased all quiet sounds will be more stressed and loud sound will be more shaded. When DRC Power is decreasd dynamic range compression will have less influence at output. Zero DRC Power level means that dynamic range compression applied at normal.

* CPU load.

    Indicates CPU load by sound decoding and processing. All sound processing (if exists) before reproduction included here.

* Input/output levels.

    Current audio levels indication for each channel. Note that levels here are in logarithmic scale. Input levels shows real channels configuration. Often happens that when BSI shows 5.1 in real LFE channel is absent (read What is LFE? section for more information about this). If output levels become red it indicates overflow and you need to decrease gain.

* Presets

    This section allows to manage persets. You can load/save/delete presets. Several predefined presets are available:
    You can also load/save presets to/from file with file button:



Mixer settings

    Second page is mixer settings.

 

    For convenience some controls from Main page are placed here. For its description look at Main settings.

    Main controls here are mixing matrix. It is in form of matrix multiplication: S' = M*S, where S = { L, C, R, SL, SR, LFE } - input sample, S' = { L', C', R', SL', SR', SW' } - output sample.

    More simple it means next rule for each cell: we mix channel specified by column to channel specified by row with gain specified in cell. So if we want to route left channel to right speaker we should set 1 in cell at cross of 'L' column and 'R' row. If we don't want to hear left channel from left speakers anymore then we set 0 at cross 'L' column and 'L' row. If we make same operation with right and surround channel then we fully swap left and right channel. (Note, that in this case we fully swap 'L' and 'R' rows).

    It is nessesary to clearly distinct concepts of input and output channels. Input channel is what was coded in AC3 stream. Output channel is what we'll hear from speakers.

    Row determines what we'll hear from corresponding output channel. For matrix shown above from left chanel we'll hear 1 part of input left channel, part of center channel, lowered left surround and LFE.

    Column determines where input channel will be mixed. For matrix shown above center channel will be routed to left and right channel with factor 0.7. So we'll hear center channel in center of left and right speakers. If we make it louder in one of speakers then center will be 'shifted' toward this speaker.

    When Auto matrix is enabled then matrix is automatically calculated and changed with parameters change. For example if we change Center level we'll see factors change in 'C' column.

    Settings description:
    Combo-box allows to save and load saved matrices.

Equalizer and delays.



    Right part is fully about equalizer. Everything is obvious so I will not bother myself with full description ;-).

    Left top corner are delay settings to compensate different distances to speakers. Ideally all speakers should be at equal distance to listener so sound emitted simultaneously from all speakers reach listener at the same time. Otherwise sound picture will be distorted. But in practice distance to speakers may be different. To compensate this difference sound should be delayed.

    Delay value may be set directly in ms or samples. Negative value means that channel should be reproduced 'earlier' than 'null time' (if speaker is placed farther then it should start to work earlier because sound needs more time to reach listener).

    For convenience it is possible to set distance to speakers. In this case positive values means negative delay for speaker start to work earlier. Negative values means positive delay.



What is LFE?


    First and most important thing is that LFE is not the same thing as subwoofer! And 5.1 in case of AC3 is not the same as 5.1 in case of computer acoustics.

    AC3 format was created for cinema rather than computer acoustics. In theaters acoustics is well enough to reproduce low frequencies. LFE channel was designed for powerful low frequency effects, i.e. effects that usual acoustics cannot handle. So all channels in ac3 stream contains low frequencies and LFE works only in certain moments to help main speakers to quake the walls and earth. And it is quite possible that LFE will not be enabled during the film. And it is normal.

    Computer acoustics is totally different. Most of 5.1 systems cannot reproduce low frequencies through satellites at all. So subwoofer must work all the time.

    So if we connect 5.1 acoustics and start to watch movie with 5.1 sound track with subwoofer designated only for LFE channel we will not hear basses at all!

    Threrfore if acoustics have separate subwoofer it is highly recommended to route there basses from all channels (since all channels have basses). I.e. enable Bass redirection in filter properties. Or use analogous option in sound card driver settings (if exists) and turn filter option off. Some may ask about 'right' playback. This people should read this document: (http://www.dolby.com/tech/c.i n.0011.LFE.pdf) with explanation about LFE role and how to handle it.



Cookbook.

LFE mixing.

    When it is no separate subwoofer at output configuration LFE is mixed only to front channels. If rear channels are powerful enough we can mix LFE there for louder effects:

Swap channels.

    For better understanding read Mixer settings section first (at mixer matrix description).

    Do you want real center channel on 4- channel sound card? It is possible. Of cource it is impossible to get 5 channels out of 4-channel sound card but we can use one of rear speakers as center, i.e. make 3/1 (3 front / 1 rear) configuration instead of 2/2 (2 front / 2 rear).

Maximum loudness

    If it seems that standard settings are too silent it can be fixed. Actually standard settings produce standard output. And any manipulations lead to deviations from standard.

    First that should be noted is that most films are normalized to avoid overflows. So if we just raise gain level because sound is too silent at one moment at some other moment overflow may occur.

    It is 3 main methods to avoid overflows:

    Simplest method to increase loudness is disable Auto gain control and raise Master gain level. In this case overflows will be clipped. This method increases loudness to the prejudice of quality.

    More advanced method is to enable Auto gain control, enable Normalize and raise Master gain level (till maximum level maybe). In this case after overflow gain level will be decreased. After some time gain will almost stop changing. In this case can get maximum loudness with maximum quality. This methods have imperfecttions. First it is some time needed for gain to stabilize. Second, our main goal to clearly hear low-level sound may not be reached. This method may be recommended as quick way to get maximum loudness with minimum artefacts.

    As kind of previous method Normalize may be turned off. In this case gain level after overflow will  be gradually restored up to Master level. This method is more sensible to choice of Master level. When Master level is too high and it is much of overflows (what is the consequence of high Master level) frequent and sharp gain changes may be annoying. Previous method is devoid of this defect because current gain level is not raising after overflow. But now we can hear low-level sounds  (speech for example) after explosions (after some time after it). But speech in between of explosions will be masked agian. This method is recommended for insignificant increase of Master level when it is expected rare overflows or no overflows at all.

    Next method is to use dynamic range compression (enable Use DRC option) with Master level raised. Current DRC gain level is shown at respective indicator. At silent scenes it should raise and at loud scenes it should lower. It is possible that effect from DRC is not enough so it is possible to increase effect with DRC level control. It is obvious that 'jumps' of loudness are more noticable with high DRC level. So it should be choosen carefully to make silent sounds clearly audible on the one hand and minimize gain jumps on other hand. In this method gain jumps caused by two reasons: DRC itself and auto gain control. To avoid some gain jumps auto gain can be disabled. But in this case clipping distortions may appear. So it is needed to maintain some kind of balance between all this factors.

    Next parameters affect loudness: Master, Auto gain control, Normalize,Use DRC, DRC Level. All this paramteres should be adjusted individually depending on type of acoustics, listener, and movie itself (lazy sound producer forgot to set DRC marks :-).



Registry and configuration files.

    Filter saves its state in registry key: [HKCU\Software\WinampAC3]. All filter settings are divided into 4 parts: general, matrix, equalizer and delay. Each is saved in its own registry key. Each have its own presets so we can have several equalizers and matrices and load it independently. Special meaning have preset named '_default'. At filter startup it loads all '_default' presets (for general settings, matrix, equalizer and delay) and saves settings there at shutdown.

    Configuration files are also divided into 4 sections: general, matrix, equalizer and delay. Each section contains exactly the same values as registry presets.

    All levels are stored as floating point values in factor form (not dB!).
    All floating point values are stored as 'REG_SZ' registry values.
    Boolean values are stored as integers to registry and as 'true'/'false' values to configuration files.

    Channel name abbreviations are as part of some values name:
Abbreviation
Meaning
L
Left front
C
Center
R
Right front
SL
Left surround
SR
Right surround
LFE
LFE channel
or subwoofer

Presets

Registry values:

Mixing matrices.

    Matrix values called next way: [from_channel]_[to_channel], where from_channel is mixed to to_channel with factor given in value.



Misc.

    Filter was primarily based on Open Source LibA/52 library (http://liba52.sourceforge.net) and mainly inherits its characteristics. Much was rewritten but I tried to keep its merits. I want to note high quality of this lib and high compliance with standard (http://www.atsc.org/standards/a_52a.pdf). Thanks to Aaron Holtzman and Michel Lespinasse for it.

    To Frank (doom9 forum) for Dolby ProLogic II downmix matrix.
    IXBT and Doom9 forum members for lots of testing and bug reporting and forum owners for these forums.
    And much of other people who made this project live.....



Distribution.

    This program distributed under GNU General Public Licence v2, placed in GNU_eng.txt at english language and GNU_rus.txt at russian language. Russain language version is only for information purpose only and english version have priority with all variant reading.

    This application may solely be used for demonstration and educational purposes. Any other use may be prohibited by law in some coutries. The author has no liability regarding this application whatsoever. This application may be distributed freely unless prohibited by law.

    This product distributed in hope it may be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose and compliance with any standards. I do not guarantee 24-hour (and any) support, bug correction, repair of lost data, I am not responsible for broken hardware and lost working time. I am not responsible for legality of reproducted with this program multimedia production.



Contact author.

    With all questions about this program please, email to this address:  with subject 'WinampAC3' Please, respond about all errors in porgram with following information:
    This will help me a much in bug fixing.


Changelog.

0.60b - 01.09.2003
  * Totally rewrited
  * Uses AC3Filter v0.70b AC3 decoding library
  + Own sound renderer
  + SPDIF output support
  + On-fly speaker configuration change
  + Inverse byteorder files support added
    (can now play files from AC3-Audio CD)

0.5b - 27.11.2002
  + multichannel support added
  + fixed: scratch when overload

0.4b - 25.11.2002
  - 'Expand stereo' and 'Voice control' controls 
    removed. It will be always on.
  * Bug with channel mapping fixed
  * Bug with rematrixing fixed

0.3b - 21.11.2002
  + CPU usage is working now
  + PES support added
  + Information panel (Alt-3) added
  * Fixed: one pass normalize did not work

0.2a - 20.11.2002
  * Everything was rewritten :)
  + Configuration dialog added.
  + Settings are saved to registry.

0.1a - 30.10.2002
  * first working alfa




Useful links

AC3Filter site (rus+eng): (http://xvalex.hotbox.ru/programs/ac3filter)
AC3Filter site (rus+eng): (http://ac3filter.sourceforge.net)

A/52a standard (AC3) (eng): (http://www.atsc.org/standards/a_52a.pdf).
Dolby explanations about LFE (eng): (http://www.dolby.com/tech/c.in.0011.LFE.pdf)
LibA52 library (was ac3dec) (eng): (http://liba52.sourceforge.net).
Multichannel audio reproduction at Windows (eng): (http://www.microsoft.com/hwdev/tech/audio/multichaudP.asp).
Just best video-related site (eng): (http://www.doom9.org).


Copyright (c) 2002-2003 by Alexander Vigovsky.
Last updated 29.08.2003