Auto switch of audio device sample rate
#16
OK it's perfectly clear. Thanks !
Reply
#17
Hello,

I contacted Metro Halo (my soundcard brand) and they answer that their driver is really classical :

"the MIO driver exposes a CA Sample Rate control; as long as the box is on internal clock, any properly implemented CA application can change the sample rate of the device. It's been this way for almost 18 years."

So for them the problems comes from you Smile

I don't understand what is a "CA application", but maybe you know ?

They'll try on their side too to install a kodi and test.
Maybe it's my system who is corrupted ?
Reply
#18
I forgot : it's a firewire interface.
(it if changes something)
Reply
#19
Hello,

I have news from Metric Hallo, they did test their device with Kodi and seems to confirm that there is a bug in Kodi...

Let me quote them :
(for a better understanding : he talks about "2d" and "3d" boxes. "3d" is a new version of their soundcards, that includes soft and hardware changes. In my case I use 2d version)
Quote:We finally got KODI downloaded and configured.

As you say, it doesn't change the S/R on the 2d box. 

It does change the sample rate on the 3d box.

I turned on advanced logging and looked at the log and it appears to me that they are doing the Sample Rate change wrong.

There is a CoreAudio property called NominalSampleRate that is what should be used for changing the device sample rate.

They appear to be trying to manually change the device stream format, and it looks like they are coming up with an unsupported configuration for the 2d device. Now, it is likely that our reported configuration (which is actually correct) is leading to their code building an invalid configuration for the stream format. But that's why CA hosts shouldn't try to manipulate the stream format directly -- it is too easy to mess it up. If they use the NominalSampleRate property, CA will manage the stream format for them and the sample rate will change.

In any case, I stand by my statement; they have a bug.

If any app can change the sample rate on the device using CoreAudio (and many can), then the driver is implemented correctly. Its up to the apps to implement their side of the API correctly.
Reply
#20
This story makes me notice another bug with my soundcard !

After the tests of sample rate I did, I let the "Best Match" settings checked (usually I have "Fixed" selected).

And while I was watching TV, I noticed the sound was dropping every like 2-3 seconds.
I switched back to "Fixed" : the sound is OK.
Strange no ? And the source and my card are both at 48kHz.

I'll provide a log when I can.
I begin to think that Kodi doesn't speak the right way to my soundcard Sad


My bad, see below.
Reply
#21
(2020-04-17, 12:14)jjd-uk Wrote:
(2020-04-15, 17:14)badsheep Wrote: Here is the log.

I noticed that when I choose "Optimized" my music is speed up.
From 44,1 to 48 I guess, to avoid the upsampling...
But speeding the music is neither what I want Smile

Unfortunately the logging for audio when using the player for music is not very clear. Could you enable debug logging again but this time open the Context menu with a track selected then select Play using.. and you will see 2 options PAPlayer (Default) and VideoPlayer, select VideoPlayer as this has more verbose audio stream logging and see if you get the same result, if you do then can you provide the log file. 
Hello jjd-uk,

I did test playing an 44,1kHz file with the video player as you asked, same result (the sample rate of my sound card stays at 48kHz).
Here's the log.
Reply
#22
(2020-04-18, 22:03)badsheep Wrote: This story makes me notice another bug with my soundcard !

After the tests of sample rate I did, I let the "Best Match" settings checked (usually I have "Fixed" selected).

And while I was watching TV, I noticed the sound was dropping every like 2-3 seconds.
I switched back to "Fixed" : the sound is OK.
Strange no ? And the source and my card are both at 48kHz.

I'll provide a log when I can.
I begin to think that Kodi doesn't speak the right way to my soundcard Sad


My bad, see below.

Sorry, I realize that the Tv channel that provokes that problem is in 44,1kHz (which is quite rare... I noticed that in the log)
As my soundcard was in 48kHz, that bug was normal.

So forget about this, sorry.

Still if anybody can discover why my soundcard doesn't understand the change of Sample Rate, I'd be really happy Smile

Thanks !
Reply
#23
Line 3703 confirms Kodi detects track as 44.1 khz and Line 3728 show we open audio output with 44.1 khz so this confirms the upsampling is being done outside of Kodi. Perhaps if @fritsch has a moment he can confirm he reads the log https://paste.kodi.tv/inijofoqoc.kodi the same as me.

As the internal soundcard works why do you not use this? frankly the Metric Halo device is a professional product that is completely overkill for a Kodi installation and is perhaps aim at a more professional orientated suite of software.
Reply
#24
Quote:Line 3703 confirms Kodi detects track as 44.1 khz and Line 3728 show we open audio output with 44.1 khz so this confirms the upsampling is being done outside of Kodi

Yes I agree with you. But for me this behavior is the consequence of Kodi not telling the right way to swith from sample rate. You see what I mean ?

And I agree my soundcard is a bit too powerful Wink but I love it, I had it a long time before using it with Kodi, and has too many good functions I use (eq, routing, ...)
Reply
#25
(2020-04-20, 11:55)jjd-uk Wrote: Line 3703 confirms Kodi detects track as 44.1 khz and Line 3728 show we open audio output with 44.1 khz so this confirms the upsampling is being done outside of Kodi. Perhaps if @fritsch has a moment he can confirm he reads the log https://paste.kodi.tv/inijofoqoc.kodi the same as me.

As the internal soundcard works why do you not use this? frankly the Metric Halo device is a professional product that is completely overkill for a Kodi installation and is perhaps aim at a more professional orientated suite of software.

On which line should I see the output bit depth of the audio? Thanks
Reply
#26
What is the bit depth audio of this track?

: INFO: CAESinkWASAPI::InitializeExclusive: WASAPI Exclusive Mode Sink Initialized using:AE_FMT_S24NE4MSB,96000, 2
 DEBUG: CActiveAESink::OpenSink - WASAPI Initialized:
 DEBUG:   Output Device : Speakers - Динамики (3- Sound BlasterX AE-5)
 DEBUG:   Sample Rate   : 96000
 DEBUG:   Sample Format : AE_FMT_S24NE4MSB
 DEBUG:   Channel Count : 2
 DEBUG:   Channel Layout: FL, FR
 DEBUG:   Frames        : 4800
 DEBUG:   Frame Size    : 8
Reply

Logout Mark Read Team Forum Stats Members Help
Auto switch of audio device sample rate0