AudioEngine: Difference between revisions
>DDDamian mNo edit summary |
>DDDamian No edit summary |
||
Line 1: | Line 1: | ||
'''AudioEngine''' (or AE) refers to XBMC's new audio system, a two-year project spear-headed by [[gnif]] which is intended to be released in v12 (Frodo), and has been merged with master for user testing as of May 15th, 2012. | '''AudioEngine''' (or AE) refers to XBMC's new audio system, a two-year project spear-headed by [[gnif]] which is intended to be released in v12 (Frodo), and has been merged with master for user testing as of May 15th, 2012. Why a new audio subsystem? | ||
It's been an accepted fact that the existing audio code was little-touched since the early days of XBMC, and was limited by the 16-bit architecture of the original XBox and codecs available at the time. Dolby AC3 and mp3 (or earlier formats!) ruled the media codec world. HTPC's became more mainstream, more powerful and better connected. | It's been an accepted fact that the existing audio code was little-touched since the early days of XBMC, and was limited by the 16-bit architecture of the original XBox and codecs available at the time. Dolby AC3 and mp3 (or earlier formats!) ruled the media codec world. Over time HTPC's became more mainstream, more powerful and better connected. Analog gave way to optical SPDIF connections, in turn replaced with HDMI. Processors, GPU's and media formats evolved at a steady pace. | ||
With the growth of the HTPC and new formats like those made available with Bluray technology, the audio subsystem was | With the growth of the HTPC and new formats like those made available with Bluray technology, the audio subsystem was under scrutiny as an area for improvement. Higher definition audio like multichannel FLAC was becoming a preferred standard for those demanding higher quality audio media. It was time for an update, and what an update! | ||
== History and Team == | == History and Team == | ||
Early efforts at patching fixes and even an initial attempt at a completely new system fell by the wayside. The scope of the required changes and the complexity of the API made it a daunting task, especially for volunteer programmers working in their spare time. This was compounded by the fact that XBMC runs on a wide range of hardware and operating systems. Most of the developers focus on specific platforms or subsystems within the whole of XBMC. | Early efforts at patching fixes and even an initial attempt at a completely new system fell by the wayside. The scope of the required changes and the complexity of the API made it a daunting task, especially for volunteer programmers working in their spare time. This was compounded by the fact that XBMC runs on a wide range of hardware and operating systems. Most of the developers focus on specific platforms or subsystems within the whole of XBMC. Any new system had to be platform-agnostic, cohesive and flexible. | ||
In time, it became obvious the project was going to require a full re-write and replacement of the audio engine. Furthermore, XBMC's base of hardware and OS platforms continued to grow. The detailed specifications for the new audio formats were unknown, and of course the master code for XBMC was ever-changing. | In time, it became obvious the project was going to require a full re-write and replacement of the audio engine. Furthermore, XBMC's base of hardware and OS platforms continued to grow. The detailed specifications for the new audio formats were unknown, and of course the master code for XBMC was ever-changing. | ||
Line 13: | Line 13: | ||
Over the next two years, thanks to the determination of [[gnif]] the core engines, decoders, encoders and utilities that make up '''AudioEngine''' became a reality, and other developers began to contribute to the core and especially the platform-specific sinks or output stages. Among those contributing were [[gimli]], [[fneufneu]], [[memphiz]], [[dddamian]], [[anssi]] and others. | Over the next two years, thanks to the determination of [[gnif]] the core engines, decoders, encoders and utilities that make up '''AudioEngine''' became a reality, and other developers began to contribute to the core and especially the platform-specific sinks or output stages. Among those contributing were [[gimli]], [[fneufneu]], [[memphiz]], [[dddamian]], [[anssi]] and others. | ||
There was a goal to have the new audio system ready for Eden 11.0, but there was just too much left to do. Many users were eagerly looking forward to it's inclusion, but stable releases must continue, and AE wasn't ready when the Eden feature-freeze went into effect. During this time the AE code-base was solidified, bugs tracked and squashed, features added and testing increased. | |||
On May 15th 2012, [[AudioEngine]] was merged to master. Weighing in at over 22,000 lines of code, it represents one of the single biggest code-merges ever for XBMC. Now for the first time it is readily accessible for all the development team (and users!) to see, test and improve within the greater context of XBMC's master branch. | On May 15th 2012, [[AudioEngine]] was merged to master. Weighing in at over 22,000 lines of code, it represents one of the single biggest code-merges ever for XBMC. Now for the first time it is readily accessible for all the development team (and users!) to see, test and improve within the greater context of XBMC's master branch. | ||
Line 19: | Line 21: | ||
== Features == | == Features == | ||
Features of AE include: | '''Features of AE include:'''<br /> | ||
- support for DTS-MA / Dolby TrueHD Bluray formats | |||
- support for 24-bit and floating-point audio at up to 384,000hz | - ''support for DTS-MA / Dolby TrueHD Bluray formats''<br /> | ||
- mixing of all streams including GUI sounds even when passing through or transcoding audio | |||
- start-up enumeration of hardware audio devices and their capablities with log output | - ''support for 24-bit and floating-point audio at up to 384,000hz''<br /> | ||
- bitstreaming support in PAPlayer | |||
- upmixing of stereo to full channel layout | - ''mixing of all streams including GUI sounds even when passing through or transcoding audio''<br /> | ||
- tighter syncing of A/V streams | |||
- floating-point processing of audio | - ''start-up enumeration of hardware audio devices and their capablities with log output''<br /> | ||
- 24-bit and floating-point decoding/handling of mp3 | |||
- full support for ReplayGain | - ''bitstreaming support in PAPlayer''<br /> | ||
- built-in sample-rate conversion and transcoding | |||
- ''upmixing of stereo to full channel layout''<br /> | |||
- ''tighter syncing of A/V streams''<br /> | |||
- ''floating-point processing of audio''<br /> | |||
- ''24-bit and floating-point decoding/handling of mp3''<br /> | |||
- ''full support for ReplayGain''<br /> | |||
- ''built-in sample-rate conversion and transcoding''<br /> | |||
'''Planned Features for upcoming AE releases:'''<br /> | |||
- ''rules-based decisions for output formats based on hardware capabilites''<br /> | |||
- ''a range of DSP's (digital signal processors) including headphone head-related transfer function processing, DRC (dynamic range compression), low-pass filtering for subs and an equalizer function''<br /> | |||
- ''custom channel-mixing/mapping for up and downmixing''<br /> | |||
<br /> | |||
It's still early days for AE. Bugs will be found, and new and exciting features added. If you want to give it a try just grab one of the [http://sshcs.com/xbmc/ nightly versions] on one of XBMC's mirrors. | |||
AudioEngine replaces SDL and brings some of the external dependencies into XBMC, and wraps up all the different media types for mixing, samplerate conversion, format conversion, encoding, upmix, downmix, etc. | AudioEngine replaces SDL and brings some of the external dependencies into XBMC, and wraps up all the different media types for mixing, samplerate conversion, format conversion, encoding, upmix, downmix, etc. | ||
== | == GUI Settings == | ||
AE brings several new settings to the graphical user interface (GUI) as well as to advancedsettings.xml. | AE brings several new settings to the graphical user interface (GUI) as well as to advancedsettings.xml. | ||
Line 58: | Line 78: | ||
'''Passthrough output device''' - device you use to play encoded formats (those checked in "xxx capable receiver" above)<br /> | '''Passthrough output device''' - device you use to play encoded formats (those checked in "xxx capable receiver" above)<br /> | ||
'''Play GUI sounds''' - select from never, only when playback stopped, or always | '''Play GUI sounds''' - select from never, only when playback stopped, or always<br /> | ||
'''Music > Playback ''' [[File:Music_-_Playback.png|border|900px]]<br /> | |||
Here you can find the settings for [http://en.wikipedia.org/wiki/ReplayGain ReplayGain] and Cross-Fading music (gapless playback). | |||
== Advanced Settings == | |||
Current [http://wiki.xbmc.org/index.php?title=AdvancedSettings.xml advancedsettings.xml] tags for AE.<br /> | |||
<'''advancedsettings'''> | |||
<'''audio'''> | |||
<'''resample'''>0'''</resample'''> | |||
<'''allowtranscode44100'''>0'''</allowtranscode44100'''> | |||
<'''forceDirectSound'''>0'''</forceDirectSound'''> | |||
<'''audiophile'''>0'''</audiophile'''> | |||
<'''audiosinkbufferdurationmsec'''>50'''</audiosinkbufferdurationmsec'''> | |||
'''</audio'''> | |||
<'''/advancedsettings'''>' <br /> | |||
'''resample''' - force resampling of audio at a given frequency e.g. 48000 = 48khz<br /> | |||
'''forceDirectSound''' - win-specific - will not use Wasapi API 0 = false, 1 = true<br /> | |||
'''audiophile''' - forces playback of original format, will not down/upmix next song to match current, not compatible with cross-fading 0 = false, 1 = true<br /> | |||
'''audiosinkbufferdurationmsec''' - win-specific, buffer time in msec, hard minimum of 50msec<br /> | |||
'''allowtranscode44100''' - allows 44100hz when trancoding for SPDIF devices 0=false, 1=true<br /> | |||
<br /> | |||
Default values are shown above in the code box - these values are used if that tag does not exist. | |||
== Support == | |||
The best place to get support for AE-related issues is the XBMC forum. Several threads exist - reading them will often answer any issues, and of course you can receive assistance there.<br /> | |||
[http://forum.xbmc.org/showthread.php?tid=78289 Main AE forum thread]<br /> | |||
[http://forum.xbmc.org/showthread.php?tid=124600 Windows AE forum thread]<br /> | |||
[http://forum.xbmc.org/showthread.php?tid=128298 Linux AE forum thread]<br /> | |||
[https://github.com/gnif/xbmc/tree/AE GitHub Development Branch (outside master)]<br /> | |||
==See also== | ==See also== | ||
*[[Windows audio APIs]] | *[[Windows audio APIs]] | ||
--[[User:DDDamian|DDDamian]] 14:40, 30 May 2012 (EDT) | |||
[[Category:Development]] | [[Category:Development]] |
Revision as of 18:40, 30 May 2012
AudioEngine (or AE) refers to XBMC's new audio system, a two-year project spear-headed by gnif which is intended to be released in v12 (Frodo), and has been merged with master for user testing as of May 15th, 2012. Why a new audio subsystem?
It's been an accepted fact that the existing audio code was little-touched since the early days of XBMC, and was limited by the 16-bit architecture of the original XBox and codecs available at the time. Dolby AC3 and mp3 (or earlier formats!) ruled the media codec world. Over time HTPC's became more mainstream, more powerful and better connected. Analog gave way to optical SPDIF connections, in turn replaced with HDMI. Processors, GPU's and media formats evolved at a steady pace.
With the growth of the HTPC and new formats like those made available with Bluray technology, the audio subsystem was under scrutiny as an area for improvement. Higher definition audio like multichannel FLAC was becoming a preferred standard for those demanding higher quality audio media. It was time for an update, and what an update!
History and Team
Early efforts at patching fixes and even an initial attempt at a completely new system fell by the wayside. The scope of the required changes and the complexity of the API made it a daunting task, especially for volunteer programmers working in their spare time. This was compounded by the fact that XBMC runs on a wide range of hardware and operating systems. Most of the developers focus on specific platforms or subsystems within the whole of XBMC. Any new system had to be platform-agnostic, cohesive and flexible.
In time, it became obvious the project was going to require a full re-write and replacement of the audio engine. Furthermore, XBMC's base of hardware and OS platforms continued to grow. The detailed specifications for the new audio formats were unknown, and of course the master code for XBMC was ever-changing.
In November of 2009 gnif decided to bite the proverbial bullet, and after extensive consultation with the team finalized the API or structure which was to become AE. Drawing in other dev's as required, the massive project slowly took shape, and reached the ready-point for user tests a year later. The forum thread for those hardy beta-testers (thank you!) reached over 1,200 posts, and slowly but surely features were added and debugged, and system stability grew.
Over the next two years, thanks to the determination of gnif the core engines, decoders, encoders and utilities that make up AudioEngine became a reality, and other developers began to contribute to the core and especially the platform-specific sinks or output stages. Among those contributing were gimli, fneufneu, memphiz, dddamian, anssi and others.
There was a goal to have the new audio system ready for Eden 11.0, but there was just too much left to do. Many users were eagerly looking forward to it's inclusion, but stable releases must continue, and AE wasn't ready when the Eden feature-freeze went into effect. During this time the AE code-base was solidified, bugs tracked and squashed, features added and testing increased.
On May 15th 2012, AudioEngine was merged to master. Weighing in at over 22,000 lines of code, it represents one of the single biggest code-merges ever for XBMC. Now for the first time it is readily accessible for all the development team (and users!) to see, test and improve within the greater context of XBMC's master branch.
Team-XBMC is proud to at last unveil AudioEngine, bringing HD audio to XBMC!
Features
Features of AE include:
- support for DTS-MA / Dolby TrueHD Bluray formats
- support for 24-bit and floating-point audio at up to 384,000hz
- mixing of all streams including GUI sounds even when passing through or transcoding audio
- start-up enumeration of hardware audio devices and their capablities with log output
- bitstreaming support in PAPlayer
- upmixing of stereo to full channel layout
- tighter syncing of A/V streams
- floating-point processing of audio
- 24-bit and floating-point decoding/handling of mp3
- full support for ReplayGain
- built-in sample-rate conversion and transcoding
Planned Features for upcoming AE releases:
- rules-based decisions for output formats based on hardware capabilites
- a range of DSP's (digital signal processors) including headphone head-related transfer function processing, DRC (dynamic range compression), low-pass filtering for subs and an equalizer function
- custom channel-mixing/mapping for up and downmixing
It's still early days for AE. Bugs will be found, and new and exciting features added. If you want to give it a try just grab one of the nightly versions on one of XBMC's mirrors.
AudioEngine replaces SDL and brings some of the external dependencies into XBMC, and wraps up all the different media types for mixing, samplerate conversion, format conversion, encoding, upmix, downmix, etc.
GUI Settings
AE brings several new settings to the graphical user interface (GUI) as well as to advancedsettings.xml.
Audio output - choose your device type: analog, optical or HDMI
Speaker configuration - select your physical speaker layout
Boost volume level on downmix - self-explanatory
Output Stereo to all speakers - re-maps and upmixes two channel sources to all speakers in Speaker Configuration
XXX capable receiver - select if your receiver or device natively decodes these formats
Audio output device - device you use to play pcm or decoded audio such as mp3's and FLAC
Passthrough output device - device you use to play encoded formats (those checked in "xxx capable receiver" above)
Play GUI sounds - select from never, only when playback stopped, or always
Music > Playback File:Music - Playback.png
Here you can find the settings for ReplayGain and Cross-Fading music (gapless playback).
Advanced Settings
Current advancedsettings.xml tags for AE.
<advancedsettings> <audio> <resample>0</resample> <allowtranscode44100>0</allowtranscode44100> <forceDirectSound>0</forceDirectSound> <audiophile>0</audiophile> <audiosinkbufferdurationmsec>50</audiosinkbufferdurationmsec> </audio> </advancedsettings>'
resample - force resampling of audio at a given frequency e.g. 48000 = 48khz
forceDirectSound - win-specific - will not use Wasapi API 0 = false, 1 = true
audiophile - forces playback of original format, will not down/upmix next song to match current, not compatible with cross-fading 0 = false, 1 = true
audiosinkbufferdurationmsec - win-specific, buffer time in msec, hard minimum of 50msec
allowtranscode44100 - allows 44100hz when trancoding for SPDIF devices 0=false, 1=true
Default values are shown above in the code box - these values are used if that tag does not exist.
Support
The best place to get support for AE-related issues is the XBMC forum. Several threads exist - reading them will often answer any issues, and of course you can receive assistance there.
GitHub Development Branch (outside master)
See also
--DDDamian 14:40, 30 May 2012 (EDT)