More > JRiver Media Center 29 for Mac

Audio sample rate problem

<< < (2/3) > >>

bob:

--- Quote from: blgentry on April 08, 2022, 06:08:23 am ---This has been happening to me for many years.  It usually happens when I play a YouTube video and YouTube/MacOS sets my audio device to 48kHz.  When I then use MC to play a 44.1kHz file, it sounds way slow and low pitched, because it's being played at 48kHz, instead of 44.1.

Generally, the "fix" for me is to press STOP on MC, which seems to reset things.  I generally never use the stop key.  Instead I use the Play/Pause key.  I see no reason to use stop.  I think this is why MC is not setting the sample rate.  MC thinks it set the sample rate at the beginning of the song, so it doesn't bother to reset it when I "unpause" a paused track.  But this track has been paused for minutes, hours, or days, and another program has reset the sample rate while MC was paused.

I guess one possible fix would be to reset the sample rate on every unpause event.

Brian.

--- End quote ---
That makes sense now. Hitting the pause button doesn't close the device. Keeping the device open across tracks etc (gapless) is what makes it possible to avoid clicks, pops etc when stopping and starting.
We don't SET the sample rate, we CHOOSE to open a stream using a handle that Apple gives us with a correct sample rate.

bob:

--- Quote from: blgentry on April 08, 2022, 06:08:23 am ---This has been happening to me for many years.  It usually happens when I play a YouTube video and YouTube/MacOS sets my audio device to 48kHz.  When I then use MC to play a 44.1kHz file, it sounds way slow and low pitched, because it's being played at 48kHz, instead of 44.1.

Generally, the "fix" for me is to press STOP on MC, which seems to reset things.  I generally never use the stop key.  Instead I use the Play/Pause key.  I see no reason to use stop.  I think this is why MC is not setting the sample rate.  MC thinks it set the sample rate at the beginning of the song, so it doesn't bother to reset it when I "unpause" a paused track.  But this track has been paused for minutes, hours, or days, and another program has reset the sample rate while MC was paused.

I guess one possible fix would be to reset the sample rate on every unpause event.

Brian.

--- End quote ---
Interesting, I'm completely unable to get this to happen on my Macbook pro running Catalina using the default core audio output device.
I start MC, play a 44.1k track, pause, go to another app, VLC, safari, etc, play a video with a 48k track. Unpause MC. Everything is good.

My MC is set to float output (no integer mode, no exclusive access).

Also, the midi panel doesn't show that the sample rate on the built in speakers has changed at all when I'm playing the 48k material.

bob:
When I put an external DAC on with a sample rate light, I play a track in MC, pause, play a track in YouTube, pause, play the track in MC again with a much higher sample rate, pause, unPause in YouTube and the Youtube plays fine and the sample rate doesn't change which means it's adapting to the sample rate MC set.

I'll add a reset of the sample rate on unpause, only when in non-exclusive and non-integer mode because integer mode is set differently and log it. We'll see what we get.

blgentry:
I just did some experiments of my own and I can't duplicate what I have reported.  But my report is based on several years of experience.  I'm really quite certain this has happened to me at least a dozen times. 

My guess is that there is a timing element here.  Like for example if I left MC paused for a few hours, things might be different.  I can't be sure of that and frankly I'm not going to test it as it would take too long.

But THANK YOU for adding the additional code to try to fix this unusual behavior.  We appreciate it!  :)

Brian.

aliciaviola:
This only happens with programs like WaveLab or iZotope, not with Apple Music or music played over Safari, Chrome or the finder.
29.0.30 seems to fix the problem that exists for many years now (like that with special characters that up to now has not been solved).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version