Posts: 29
Joined: May 2012
Reputation:
0
amand
Junior Member
Posts: 29
Hello!
I've just catch a very strange behaviour of kodi (16.1).
The visualization Waveform does not show the same if I use two different soundcards... (it is in fact the same problem with all vizualisation addons...).
With my edirol UA-20, the waveforms are just what they need to be, with my C-Media card, the waveforms are strange and glitchy.
With a little Addon, I've successed to read the pAudioData from the AudioData functions...
and they are different if I changed the soundcard!
Do you have some similar problem?
Could it be link to stereo or 7.1 soundcards difference?
I hope you can help me!
amand.
Posts: 1,506
Joined: Nov 2013
it's likely related to audio format used by the sound card (although that is certainly a bug). debug logs should tell if we are onto something.
Posts: 29
Joined: May 2012
Reputation:
0
amand
Junior Member
Posts: 29
Hi!
When I look the .log, I see :
- with my UA-20 (edirol), the file is played with CAESinkALSA (visualisation works)
- with my C-Media (CMI8738/CMI8768), the file is played with PAPlayer (visualisation does not work...)
My system is a linux box.
Posts: 1,506
Joined: Nov 2013
2016-09-14, 14:42
(This post was last modified: 2016-09-14, 14:43 by ironic_monkey.)
please put both logs on pastebin and link them here. no offense, but i have a bit more experience interpreting the logs.
in particular you list the audio sink from one of the logs and the player from the other (the player feeds the sink..)
Posts: 1,506
Joined: Nov 2013
right, sample rates and bitness differs.
Posts: 23,554
Joined: Aug 2011
Reputation:
1,108
fritsch
Team-Kodi Developer
Posts: 23,554
Most likely, yes. Please open a trac ticket. Please assign it to me and also add fernetmenta. Don't forget your logs v17 nightly is preferred as we ended v16 development.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 29
Joined: May 2012
Reputation:
0
amand
Junior Member
Posts: 29
Ok, I will install kodi 17 nightly to test the problem, and to make my log.
Btw, I have tried kodi 17 before, but there was a problem with the video player: the video loses fluidity sometimes for a couple of minutes. I was thinking it's the beta status of kodi 17.. But perhaps not!
And something else, perhaps the same problem, I can hear sound of 5.1 .ogg file with my UA-20, not with the C-Media...
I test all that, get some logs, and send the ticket!
Thanks a lot!
Posts: 23,554
Joined: Aug 2011
Reputation:
1,108
fritsch
Team-Kodi Developer
Posts: 23,554
The problem here is a flaw in how we manage viz. We always only take the first 512 elements from the front, no matter how large the buffer is. So depending on different buffer size, the viz will look differently. This is an ever lasting design flaw :-(
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 29
Joined: May 2012
Reputation:
0
amand
Junior Member
Posts: 29
Oh, let me see if I understand :
if my soundcard is a stereo, the data are the right and left channel ; if the soundcard is a 5.1 one, the data are the result of the treatment of the sound (a stereo song for example) to the 5.1 channel.
There is no way to always force a stereo flux of data?
Or something else: in the Start function of the viz addon we can get iChannels, iSamplesPerSec and iBitsPerSample, if we know the number of channel, perhaps we could use it for our viz. Presently, these data does not have right values...
Posts: 23,554
Joined: Aug 2011
Reputation:
1,108
fritsch
Team-Kodi Developer
Posts: 23,554
Could you recompile my devcon16 branch and see what happens?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 23,554
Joined: Aug 2011
Reputation:
1,108
fritsch
Team-Kodi Developer
Posts: 23,554
Looking at the viz / spectrum implementation they don't account for the sample rate at all - meaning it will differ whenever we speak a different internal sampleRate - the above patches "worksaround" this by forcing 44100 hz for the samplebuffer. This removes "a feature" so that addons don't have to care.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Posts: 1,506
Joined: Nov 2013
2016-09-16, 11:52
(This post was last modified: 2016-09-16, 11:53 by ironic_monkey.)
a flaw inherited from the xbox days when it was always exactly 48000hz 16bit audio. sane thing would be to always resample to a given freq. obviously there are costs involved with that.
Posts: 23,554
Joined: Aug 2011
Reputation:
1,108
fritsch
Team-Kodi Developer
Posts: 23,554
After that above patch it will be 44100 Float. So you want it 48 khz 16 bit again?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.