Kodi Community Forum
AudioEngine branch - DO NOT REQUEST BINARY BUILDS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: AudioEngine branch - DO NOT REQUEST BINARY BUILDS (/showthread.php?tid=78289)



- gnif - 2011-07-27

@nirmv - Channel output issue has been fixed

Updates:
* An issue with re-initialization of sounds was discovered and corrected
* Thread locking on the sounds, and re-initialization has been improved
* AE now behaves differently with output device configuration...
* Has been merged with master, so all latest changes are now in there
* PAP had an issue with files that report incorrect length, this has been fixed

case 1) when nothing is playing at all
* AE will attempt to open at the streams sample rate and channel count/layout.
* If the samplerate cant be obtained from the hardware, AE will resample
* If the stream has channels in it that are not in your configured layout it will be downmixed to match.
* If the stream has channels that your hardware can not do, AE will downmix to match.

case 2) when an existing stream is already playing (eg, crossfade)
* AE will use the current audio output configuration that was configured by the previous stream. This means that:
---If your playing 2.0 and then cross fade to a 7.1 stream, the 7.1 stream will be down-mixed to 2.0---
---If your playing 44.1kHz and then cross fade to a 48khz stream, the 48khz stream will be re-sampled to 44.1kHz---

Edit: There is a patch coming to reverse this behaviour so that the new stream format gets applied instead, but it will cause a definite gap in playback when it occurs.

case 3) when all streams close
* AE will continue to use the output configuration provided it was not mono.
* If the output was mono, AE will re-open in 2.0
* When a new stream comes along, see case 1.

In ALL cases GUI sounds are down mixed and re-sampled to match the current output format.
In ALL cases, mono is up-mixed to 2.0 (Dual Mono)


- einhänder - 2011-07-27

@ gnif

Thanks a lot for the update!
I just tried to build commit 6a289732c1130764627be8e2b029d7a36261108e and wanted to let you know the build process fails atm:

Code:
make[1]: Leaving directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/lib/libdvd'
test -d system/players/paplayer || mkdir system/players/paplayer
make -C lib/xbadpcm
make[1]: Entering directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/lib/xbadpcm'
CC      uXboxAdpcmDecoder.o
CPP     ADPCMDll.o
/usr/bin/ccache i686-pc-linux-gnu-gcc -march=prescott -Os -pipe -fomit-frame-pointer -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -O2 -march=prescott -Os -pipe -fomit-frame-pointer -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -O2 -D_LINUX -fPIC -march=prescott -Os -pipe -fomit-frame-pointer -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -shared -o /var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/system/players/paplayer/adpcm-i486-linux.so *.o `cat /var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/xbmc/cores/DllLoader/exports/wrapper.def` /var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/xbmc/cores/DllLoader/exports/wrapper.o
make[1]: Leaving directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/lib/xbadpcm'
make -C lib/vgmstream
make[1]: Entering directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/lib/vgmstream'
CC      src/coding/acm_decoder.o
cp: cannot stat `src/coding/acm_decoder.d': No such file or directory
make[1]: *** [src/coding/acm_decoder.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/lib/vgmstream'
make: *** [papcodecs] Error 2



- T800 - 2011-07-27

Can anyone point me towards a decent guide to compiling XBMC?
I've tried some guides and can't even get the Tortoisegit to open like it does in the wiki and I'm ready to set my head on fire with the frustration! Nod


- kilikkun - 2011-07-27

@T800 I think I had the same issue you did. When you right click and select "Git Clone" do you get an error saying it was unable to locate Git? If so, go here (http://code.google.com/p/msysgit/downloads/list) and download Git (the 1.7.6 preview). Next time you select the "Git Clone" and it asks you to specify where git.exe is located, you can point it to the exe that that installer creates. After that, the guide shouldn't give you problems.

If you are having a different issue, nevermind lol.


- nirmv - 2011-07-27

EDIT: Maybe it's a bug that comes from Master. OThers are reporting :
http://forum.xbmc.org/showthread.php?tid=105554

gnif Wrote:* AE now behaves differently with output device configuration...

Hi gnif, can you elaborate on this ?

audio output device was configured as "custom" with "hw:CARD=NVidia,DEV=7"
and passthrough output device as "custom", with "hdmi:CARD=NVidia,DEV=1"

(don't ask me why, it was the only option that was working, I'm using Asrock Vision 3D)

After today's pull, can't hear sound anymore,
and when trying to change custom to other options, I see the line "Error - no devices found"


Code:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
front:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Front speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
    HDA Intel, ALC892 Digital
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Direct sample mixing device
dmix:CARD=Intel,DEV=1
    HDA Intel, ALC892 Digital
    Direct sample mixing device
dsnoop:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Direct sample snooping device
dsnoop:CARD=Intel,DEV=1
    HDA Intel, ALC892 Digital
    Direct sample snooping device
hw:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Direct hardware device without any conversions
hw:CARD=Intel,DEV=1
    HDA Intel, ALC892 Digital
    Direct hardware device without any conversions
plughw:CARD=Intel,DEV=0
    HDA Intel, ALC892 Analog
    Hardware device with all software conversions
plughw:CARD=Intel,DEV=1
    HDA Intel, ALC892 Digital
    Hardware device with all software conversions
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    HDMI Audio Output
dmix:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    Direct sample mixing device
dmix:CARD=NVidia,DEV=7
    HDA NVidia, HDMI 0
    Direct sample mixing device
dmix:CARD=NVidia,DEV=8
    HDA NVidia, HDMI 0
    Direct sample mixing device
dmix:CARD=NVidia,DEV=9
    HDA NVidia, HDMI 0
    Direct sample mixing device
dsnoop:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    Direct sample snooping device
dsnoop:CARD=NVidia,DEV=7
    HDA NVidia, HDMI 0
    Direct sample snooping device
dsnoop:CARD=NVidia,DEV=8
    HDA NVidia, HDMI 0
    Direct sample snooping device
dsnoop:CARD=NVidia,DEV=9
    HDA NVidia, HDMI 0
    Direct sample snooping device
hw:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    Direct hardware device without any conversions
hw:CARD=NVidia,DEV=7
    HDA NVidia, HDMI 0
    Direct hardware device without any conversions
hw:CARD=NVidia,DEV=8
    HDA NVidia, HDMI 0
    Direct hardware device without any conversions
hw:CARD=NVidia,DEV=9
    HDA NVidia, HDMI 0
    Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    Hardware device with all software conversions
plughw:CARD=NVidia,DEV=7
    HDA NVidia, HDMI 0
    Hardware device with all software conversions
plughw:CARD=NVidia,DEV=8
    HDA NVidia, HDMI 0
    Hardware device with all software conversions
plughw:CARD=NVidia,DEV=9
    HDA NVidia, HDMI 0
    Hardware device with all software conversions


Thanks,
nirmv


- cdhesse - 2011-07-28

gnif Wrote:@cdhesse - You will be able to play that even if you dont have DTS-HD, AE pulls the DTS CoreAudio out of it so you still get standard DTS.

@gnif - Here is the log trying to play the sample file. http://pastebin.com/g2Bfa0UM

The behavior here was slightly different... video started playing (no audio), and about where the first lion's roar would be, video closes and I'm back at the menu.

Let me know if you need something else - FYI this was on a build from about 4 days ago I just remembered so I can redo this test if you think it will make a difference.

Thanks!


24 bit vs. other bit rates - cdhesse - 2011-07-28

Question: Can I tell from the debug log whether or not my 24bit tracks are actually playing at 24 bit, or if they are downgraded to 16?


- gnif - 2011-07-28

@nirmv - The changes are described in the post, its nothing to do with the output device string, it is how AE chooses to use the channels/sample rate.

From now on, any posts of issues WITHOUT a log will be DELETED

@cdhesse - The log has a section that shows how the output device was opened, if your using ALSA, look for that section, it may appear multiple times as you play different files, the last/latest one is whats currently being used.


- gnif - 2011-07-28

einhänder Wrote:@ gnif

Thanks a lot for the update!
I just tried to build commit 6a289732c1130764627be8e2b029d7a36261108e and wanted to let you know the build process fails atm:

No, it doesn't, your build environment is broken, your probably using icecc, or distc. The file that is failing is part of ffmpeg which AE does not touch.


- gnif - 2011-07-28

Update

Since topfs2 updated & fixed Pulse Audio support, many of you might have not realized that AE is now using pulse if you have it. Since Pulse does not support pass-through it may be the cause of your issues at the moment. Pulse also doesnt let you select a sound device, that's why the device spinner is reporting none found. (this affects linux only)

I just committed a fix that allows you to choose the engine at start up, to do so, you need to set the environment variable AE_ENGINE to either "PULSE" or "SOFT", it is case insensitive.

Example:
Code:
AE_ENGINE=SOFT ./xbmc.bin



- einhänder - 2011-07-28

gnif Wrote:No, it doesn't, your build environment is broken, your probably using icecc, or distc. The file that is failing is part of ffmpeg which AE does not touch.

well no. i don't use any distributed build environments and ccache is disabled, too.

however, i just tried to build the master branch which stops during the build process with the same error.

never mind. i have to investigate why this happens.

edit: looks like i forgot to disable ccache completely in regards to the snipped i posted before. now trying to build with --disable-ccache.


- Wanilton - 2011-07-28

Gnif, hello first thanks for beautiful job in AE, i try compile update version today in windows 7, 64 bits, here link with 1 error stop de build process, too..
AEChannelInfo.cpp
..\..\xbmc\cores\AudioEngine\Sinks\AESinkDirectSound.cpp(199): error C2039: 'GetTimeMS' : is not a member of 'CTimeUtils'
C:\DEV\gnif-xbmc-a4a406b\xbmc\utils/TimeUtils.h(33) : see declaration of 'CTimeUtils'
..\..\xbmc\cores\AudioEngine\Sinks\AESinkDirectSound.cpp(199): error C3861: 'GetTimeMS': identifier not found
..\..\xbmc\cores\AudioEngine\Sinks\AESinkDirectSound.cpp(357): error C2039: 'GetTimeMS' : is not a member of 'CTimeUtils'
C:\DEV\gnif-xbmc-a4a406b\xbmc\utils/TimeUtils.h(33) : see declaration of 'CTimeUtils'
..\..\xbmc\cores\AudioEngine\Sinks\AESinkDirectSound.cpp(357): error C3861: 'GetTimeMS': identifier not found


- ArtVandelae - 2011-07-28

It's an artifact from the merge with the mainline. I'll fix it up today.


- liquidskin76 - 2011-07-28

ArtVandelae Wrote:It's an artifact from the merge with the mainline. I'll fix it up today.

Great! Thanks Wink


- einhänder - 2011-07-28

einhänder Wrote:edit: looks like i forgot to disable ccache completely in regards to the snipped i posted before. now trying to build with --disable-ccache.

...indeed ccache was responsible.

now the build process stops at:
Code:
make[1]: Leaving directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/xbmc/cores/dvdplayer/DVDSubtitles'
make -C xbmc/cores/AudioEngine
make[1]: Entering directory `/var/tmp/portage/media-tv/xbmc-9999/work/xbmc-9999/xbmc/cores/AudioEngine'
CPP     AEFactory.o
AEFactory.cpp: In static member function ‘static bool CAEFactory::LoadEngine()’:
AEFactory.cpp:45: error: ‘AE_ENGINE_PULSE’ was not declared in this scope
make[1]: *** [AEFactory.o] Error 1

i already checked AEFactory.cpp and AEFactory.h but can't find what could be wrong until now.