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)



- cdhesse - 2011-07-18

gnif Wrote:Thanks for the logs, I will look at them shortly


@cdhesse:
Please provide me with a clean log, eg:
1) run xbmc
2) play ONE file
3) exit xbmc

Sorry! Still learning how to participate the right way - here is an updated version of my debug log with a start, play, shutdown only.

Thanks! http://pastebin.com/ZurNZ6Zx


- indy5 - 2011-07-19

I complied a windows build on friday and have been having some odd "lock up" problems playing back various files. The video freezes up and the audio begins to skip.

Here's my log file
http://pastebin.com/rSX7hYn1

The log seems to repeat messages like these:

14:57:23 T:8632 M:2491355136 WARNING: CRenderManager::FlipPage - timeout waiting for previous frame
14:57:24 T:5948 M:2492817408 WARNING: Previous line repeats 10 times.
14:57:24 T:5948 M:2492817408 WARNING: CDVDMessageQueue(audio)::Get - asked for new data packet, with nothing available

Thanks for any help!


- gnif - 2011-07-19

@indy5
The logs are un-related, the issue is known and should be corrected in the latest build, but as I stated, it is not yet ready for use so please wait.

People
Please do not post problem reports if you are not running the latest version.


- gnif - 2011-07-19

@indy5: Just noticed that you have not built the AE branch, there is nothing in that log at all related to AE.

@cdhesse: AE failed to open the sound device...
Code:
CAESinkALSA::Initialize - Attempting to open device 0,9:AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02
0,9 is wrong, get aplay to work on your hardware first in passthrough.


- indy5 - 2011-07-19

gnif Wrote:@indy5: Just noticed that you have not built the AE branch, there is nothing in that log at all related to AE.

@cdhesse: AE failed to open the sound device...
Code:
CAESinkALSA::Initialize - Attempting to open device 0,9:AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02
0,9 is wrong, get aplay to work on your hardware first in passthrough.

That's strange as I have the options under audio for the AE branch. I get DTS HD MA displayed on my receiver when playing back one of those files....


- cdhesse - 2011-07-19

gnif Wrote:@indy5: Just noticed that you have not built the AE branch, there is nothing in that log at all related to AE.

@cdhesse: AE failed to open the sound device...
Code:
CAESinkALSA::Initialize - Attempting to open device 0,9:AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02
0,9 is wrong, get aplay to work on your hardware first in passthrough.

Yeah, that's the thing... aplay works fine, speaker test works fine with device hw:0,9. In the main branch compile, as well as 10.1, this custom device is what works on this system. It is only when I compile AE that hw:0,9 doesn't work.

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

For example - a sound test like this also works...
Code:
cdhesse@gilmour:~$ speaker-test -Dhw:0,9 -c2

speaker-test 1.0.24.2

Playback device is hw:0,9
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
1 - Front Right

I'm just assuming that since this works in all other situations, it would have something to do differently with the AE compile vs 10.1 or the bleeding edge code, hopefully I'm not missing anything else...

ALSA-info if this has any additional value - http://pastebin.com/u8bKc3BH


- gnif - 2011-07-19

@cdhesse - Try "ALSA:hw:0,9"


- cdhesse - 2011-07-19

gnif Wrote:@cdhesse - Try "ALSA:hw:0,9"

Bingo - that works...

Now - is this just something I completely missed that should have always been like that, or is this something new?

Thanks for the help too! Your work is MUCH appreciated!


- gnif - 2011-07-19

@cdhesse - Its new since you can have multiple sinks for different system APIs, valid values are:

Linux:
* ALSA
* OSS

Windows:
* DirectSound
* WASAPI

By default ALSA is used, but you have exposed a bug in the parsing of the string which I will shortly correct.


- gnif - 2011-07-19

@cdhesse - Should now be fixed, if a driver name is not specified, the "hw" is not assumed to be one and it defaults to trying the device string with ALSA first, then OSS.

For those that are interested - https://github.com/gnif/xbmc/commit/2bf5ca48b6338508db2965f95ed42e57a4a658f0

I also changed the default sample rate of the engine to 48kHz as most video files are in this format, this prevents a slight delay that occurs when the audio device is re-opened to match the video format.


- hochopeper - 2011-07-19

gnif Wrote:AE is NOT all about audio quality, it is about getting the best audio quality possible within the limitations of the system and requirements of the general user, not audiophile. I am striving to reach the best of both worlds however, and I am intending on adding an advanced setting (eg: "audio.audiophile") which will override the smooth behaviour and re-open the sound device even if it will introduce gaps/pops on track change.

FWIW I think this is a great idea! Although I'll be turning that option on I wouldn't expect to see a UI option for that sort of functionality, without proper understanding of the option a user may select this option and get an unexpected result.

I think I was having problems similar to cdhesse but hadn't had a chance to dig around for the problem properly. Will test it out tonight and if it doesn't work I'll put together another log.

This is probably getting a bit ahead of where the development is up to now, but I'll ask anyway, what is the plans (if any) for room correction/drc as part of the AE work? Will this just be left up to the end user as something done by routing audio via jack?


- cdhesse - 2011-07-19

gnif Wrote:@cdhesse - Should now be fixed, if a driver name is not specified, the "hw" is not assumed to be one and it defaults to trying the device string with ALSA first, then OSS.

For those that are interested - https://github.com/gnif/xbmc/commit/2bf5ca48b6338508db2965f95ed42e57a4a658f0

I also changed the default sample rate of the engine to 48kHz as most video files are in this format, this prevents a slight delay that occurs when the audio device is re-opened to match the video format.

An observation:

The sound quality of all of my flac files is significantly better with AE. Well Done!

For movies, sound will work unless i try to play a normal dts or DD 5.1 signal, then I get the fast video etc (haven't rebuilt with this latest change yet, will do so soon). I also haven't troubleshooted on my own yet, so there could be something simple I'm missing still.

More than anything, I wanted to report the great sound quality of the 2 channel - this is MORE than what i was hoping for - keep up the great work!


- tungmeister - 2011-07-19

gnif Wrote:@tungmeister:
Check/change your output device in the audio settings.
Code:
CAESinkWASAPI::Initialize: Could not locate the device named "default" in the list of WASAPI endpoint devices.  Trying the default device...

I've tried it both set to the device name and left on default it still fails to produce any sound in exclusive mode, I've just recompiled using the latest updates and I'm still having the issue, without exclusive mode enabled everything works apart from HD audio. Here's my latest debug log http://pastebin.com/TrW9n3wL


- gnif - 2011-07-20

@tungmeister
Unfortunatly this boils down to an issue with the WASAPI sink, or your system configuration, of which neither can I help you with as I did not write that part of AE.

Code:
ERROR: CAESinkWASAPI::Initialize: WASAPI initialization failed.

See if exclusive mode(passthrough) works with VLC, if it does, then we know there is a XBMC related issue at hand.


- ArtVandelae - 2011-07-20

Unfortunately, the error code returned by the function that initializes WASAPI doesn't even help. The function just returns AUDCLNT_E_ENDPOINT_CREATE_FAILED which means that, well, opening the device in exclusive mode failed for some reason.

Are you drivers up to date and in your audio properties under the "advanced" tab is "Allow applications to take exclusive control of this device" checked? I have an ATI 4xxx series card in my HTPC as well and I can't replicate your issue.