INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Skogkatt: Clicks when starting playback  (Read 17627 times)

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Skogkatt: Clicks when starting playback
« on: October 31, 2011, 04:23:46 pm »

Being an audiophile my self and using MC exclusively for audio, I think there are a couple of easy to implement improvements:

1) Clicks/pops prevention when you start playing a new track
2) Possibility to use MC to play audio from an external source using PC's analog inputs

At least in my system I have verified there is a pattern when clicks happen at the beginning of a track: it occurs consistently when I previously stopped a track in the middle, with some music still playing. If I stop a track toward the end, when music level is almost zero, the click is either inaudible or extremely low in amplitude.

Now, it could be possible that not all the buffers in the chain are purged/flushed before start plying a new track and some "dirt" is left from the previous track. It's not necessarily a MC's problem as it could be the driver but it happens with both ASIO and WASAPI (both regular and event style).

I would think that adding a second or so of silence just after the stop button is pushed would prevent to leave undesired things somewhere. In other word, instead of stop sending bits immediately after the stop button is pushed, sending silence for a while would fill the buffers with nothing that would cause noise the next time you start play…

I can't verify if other systems behave like mine but, from an audiophile perspective, it is highly desirable to avoid flaws like clicks. :)
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Skogkatt: Clicks when starting playback
« Reply #1 on: October 31, 2011, 04:47:02 pm »

... I think there are a couple of easy to implement improvements:

1) Clicks/pops prevention when you start playing a new track
Try the option for Audio called "Flush device buffers on startup..."
Logged

mojave

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3732
  • Requires "iTunes or better" so I installed JRiver
Skogkatt: Clicks when starting playback
« Reply #2 on: October 31, 2011, 04:53:38 pm »

You will have a slight pop or click with both WASAPI or ASIO if your playback device is set to a different sample rate than the audio. The click happens because the device is matching the sample rate of the playback material. I keep my sample rate set to 44.1 in the drivers since I primarily listen to 44.1 music. I do hear the click when switching to 48 or 96 K music or movies.
Logged

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Skogkatt: Clicks when starting playback
« Reply #3 on: October 31, 2011, 05:54:56 pm »

When I tried WASAPI "Flush device buffers on startup..." was enabled but it did not help. I use ASIO because with my system it sounds slightly better...highly subjective I know...

You will have a slight pop or click with both WASAPI or ASIO if your playback device is set to a different sample rate than the audio. The click happens because the device is matching the sample rate of the playback material. I keep my sample rate set to 44.1 in the drivers since I primarily listen to 44.1 music. I do hear the click when switching to 48 or 96 K music or movies.

Your suggestion makes sense but why I do hear clicks only after I stop a track while music level is still significant and no click if the previous track was stopped toward the end where it is almost silent? This using always 44.1 music.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Skogkatt: Clicks when starting playback
« Reply #4 on: October 31, 2011, 06:08:14 pm »

What are you playing to?  An external DAC?

Try this page:
http://wiki.jriver.com/index.php/DAC_Settings

Can you try output to another device?
Logged

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Skogkatt: Clicks when starting playback
« Reply #5 on: October 31, 2011, 06:52:48 pm »

I have an external DAC connected through coaxial SPIDF. The DAC is capable to go up to 24 bits 192kHz and has an internal ASRC.

However, I also tried a HRT Music Streamer II with USB interface >>> same problem

To be clear: I never get clicks with the first play nor the second or third but just if I stop a track in the middle and start a new one.

Sure, I can double click to a new track and let MC cross fade but with classic music it isn't so pleasant.

To prove my theory of filling buffers with silence I also tried to select in options "Stop: Fadeout (slow)" but apparently it stops music immediately with no fadeout (same with all the settings).
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Skogkatt: Clicks when starting playback
« Reply #6 on: October 31, 2011, 07:08:31 pm »

Are you using the same ASIO driver for both devices?  Did you try getting the latest one from the manufacturer?

And you say the problem is the same with WASAPI?
Logged

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Skogkatt: Clicks when starting playback
« Reply #7 on: October 31, 2011, 08:22:22 pm »

I use ASIO4ALL 2.10 because the Realtek HD chipset (I get SPDIF from it) apparently doesn't come with a specific ASIO driver (Realtek driver is 2.66):
in combination with my DAC and these drivers, MC plays flawlessly music at any sample rate with exceptionally good sound quality (at least for my taste and needs) except for the little artifact mentioned.

With HRT Music Streamer I only had the chance for a brief test during a friend's visit so I used ASIO4ALL.

With my main DAC I have also tested WASAPI obtaining similar results but I'll check again: as said previously I think I have identified a recognizable pattern but this is far from an accurate scientific test.

The problem seems to appear also closing and reopening MC, so it should exclude MC' s own buffers but, perhaps, its effectiveness in flushing my combination
of ASIO/Realtek driver? I'll test again this as well to see if it is repeatable.

I might be wrong (I'll check again to be sure - I don't use it often) but remember I noticed the same problem with MC16 on my laptop which has a completely different HW/SW combination,
using the onboard sound card and headphones.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Skogkatt: Clicks when starting playback
« Reply #8 on: October 31, 2011, 08:51:48 pm »

I use ASIO4ALL 2.10 because the Realtek HD chipset (I get SPDIF from it) apparently doesn't come with a specific ASIO driver (Realtek driver is 2.66):
in combination with my DAC and these drivers, MC plays flawlessly music at any sample rate with exceptionally good sound quality (at least for my taste and needs) except for the little artifact mentioned.

With HRT Music Streamer I only had the chance for a brief test during a friend's visit so I used ASIO4ALL.

With my main DAC I have also tested WASAPI obtaining similar results but I'll check again: as said previously I think I have identified a recognizable pattern but this is far from an accurate scientific test.

The problem seems to appear also closing and reopening MC, so it should exclude MC' s own buffers but, perhaps, its effectiveness in flushing my combination
of ASIO/Realtek driver? I'll test again this as well to see if it is repeatable.

I might be wrong (I'll check again to be sure - I don't use it often) but remember I noticed the same problem with MC16 on my laptop which has a completely different HW/SW combination,
using the onboard sound card and headphones.

Please try WASAPI Event Style.

We don't recommend ASIO4All since it's just a wrapper for Kernel Streaming, and we have native Kernel Streaming when needed.

More here: http://wiki.jriver.com/index.php/Audio_Output_Modes
Logged
Matt Ashland, JRiver Media Center

BradC

  • World Citizen
  • ***
  • Posts: 207
Skogkatt: Clicks when starting playback
« Reply #9 on: October 31, 2011, 09:48:49 pm »

Hi

I have an issue that may be related to the above buffer issues.
I use the vst plugin Voxengo pristine space for room correction. I am using linear phase filters, hence they pre filter the music (ie they are non causal filters that cause a delay).

The music plays fine from a playlist, but if I skip a track, I get the sound playing that was remaining in the filter before the next track starts.
Is there a way that the filter could be flushed on a track skip?

Brad
Logged

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Skogkatt: Clicks when starting playback
« Reply #10 on: November 01, 2011, 06:17:00 am »

I have tried all Wasapi flavors as well as ASIO and found absolutely no problem playing music but if I stop a track and play another: CLICK!!! (all VST plugins and DSPs disabled)

I have also tried a cheap USB stick (Terratec Aureon) under Wasapi and ASIO: same as above.

Another test:

1) Played and stopped music (stopped during loud music) under MC, then played a track with few seconds of silence under Audacity (a free audio editor): click at the beginning of silence's reproduction, repeatable.
2) Played and stopped music (still with loud music) under Audacity, then played a track with few seconds of silence under Audacity: no click, consistently!
3) Played and stopped a track under MC (just before music starts, during the short silence there is at the beginning of some music tracks): consistently no clicks when starting a new track

I'm not a SW developer but my (faulty?) logic tells me that when MC stops playing music, a residual number of bytes remains somewhere outside MC and causes a click/pop the next time any audio application starts playing again.

That's why I initially proposed an option to add a selectable amount of silence after a stop with the purpose to flush buffers with nothing (silence): ideally I would stream silence all the time during pauses...

BTW: If I understood correctly its purpose, "Stop: Fadeout (slow, normal, and fast)" doesn't want to collaborate as I don't get any fadeout after a Stop. 
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Skogkatt: Clicks when starting playback
« Reply #11 on: November 01, 2011, 10:04:46 am »

I spent some time testing this.

I have a Sony AVR here that adds a click when starting S/PDIF.  It's especially pronounced if it receives AC3.

But my headphone amplifier connected with analog has no such click (on the same soundcard, and also on a second sound card).

One thing you could try is Options > Audio > Play silence at startup for hardware synchronization.

I tried adding more pre-rolling of silence and/or post-rolling of silence in the WASAPI - Event Style code, and it didn't help in the case of the Sony AVR.
Logged
Matt Ashland, JRiver Media Center

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #12 on: November 01, 2011, 05:56:30 pm »

Matt,

many thanks for spending your time investigating this problem.

All my tests were performed using the setting you suggested (Options > Audio > Play silence at startup for hardware synchronization): I think this is selected by default during MC's installation.

Unlike yours, the DAC in my Sony receiver has an automatic mute that not only cuts clicks but also music if the track doesn't have enough silence at the beginning. This makes the Sony not suitable for additional tests…

It seems that, as other problems that may affect sound reproduction, also this one is highly dependent on the HW/SW configuration.

However, for me it is interesting to stress the fact I was able to consistently reproduce the problem with three different DACs: one dependent from a driver (Realtek HD to SPIDF) and two driverless using USB interface.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Skogkatt: Clicks when starting playback
« Reply #13 on: November 01, 2011, 06:00:00 pm »

Are you using VST plug-ins or anything else that could affect sound?

Are you certain all DSP effects are off?
Logged

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #14 on: November 01, 2011, 06:15:29 pm »

I purposely re-run tests with DSPs unchecked, all of them.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Skogkatt: Clicks when starting playback
« Reply #15 on: November 01, 2011, 06:17:24 pm »

How about VST?  Anything else unusual?

Does it happen with more than a single format of files?
Logged

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #16 on: November 01, 2011, 07:00:07 pm »

No VST, just plain vanilla MC.

I have all my library files coded in .ape 16 bits 44.1 kHz.

Tried some flacs in the past under MC16 and, as far as I can remember, the click was there. I can try again with wav, flac, and mp3.
Logged

Sgucci99

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #17 on: November 04, 2011, 01:25:09 pm »

I absolutely agree with skogkatt, a product close to a perfection from the audiophile point of view, cannot
have clicks when playback starts.
I too, hear these clicks when the playback is stopped in the middle of the sound, and a new track is selected.
Moreover, higher is the volume of the stopped music, higher is the click.
 I m not a technician, but  It looks like there is an internal register which mantains some sound from the stopped track.
I m not using a receiver but a separate DAC.
With a receiver the problem doesn t show up.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Skogkatt: Clicks when starting playback
« Reply #18 on: November 04, 2011, 01:29:24 pm »

So you have a problem with the DAC, but not with a receiver, and you think MC is the cause?

You could try the article on DAC settings on our wiki.

Try WASAPI (both kinds) and ASIO.

What is the complete version of MC that you're using?

What type of files are you playing?
Logged

Sgucci99

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #19 on: November 05, 2011, 02:57:28 am »

yes, because the receiver applies few seconds of silence before starting the playback. indeed in some cases, I loose the first seconds of music. It is not that with the dac I always ear the click, but only when the playback is stopped in the middle of the music and I start playing another track. If the track ends and I select a new one there are no click at all. For this reason the cause is not the dac.
the sama happens with Wasapi event style, but I use Asio because it sounds better.
Thr problem happens with both Ape and Flac files.
regards
Logged

lhwidget

  • World Citizen
  • ***
  • Posts: 127
Re: Skogkatt: Clicks when starting playback
« Reply #20 on: November 05, 2011, 08:27:04 am »

Interesting...
I don't know if this helps anyone, but I thought I'd throw it out there just in case.

I'm the same way about audio playback, no clicks, burps, or digital noise wanted when playing music.

I use the analog outputs of an EMU 1212 PCIe card and its native ASIO driver.  Running MC 16.0.181 on XP Pro, SP3.

Specifically, when stopping a playing song and playing another song, I have no noise (even when going to a 44.1 Hz mp3 to a 96 MHz wave file)...  

My card is currently set for a 48 MS/sec session and drops to 44.1 for material encoded at that rate, then back up to 48 for anything higher.

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #21 on: November 05, 2011, 10:26:13 am »

Hi lhwidget,

many thanks for sharing your experience.

The fact you aren't hearing noise/pop/clicks when stopping a song and playing another one has a plausible explanation:
your card has muting at the analog output that is used to cut sound for a fraction of second after SPIDF synchronization.

As you can see from the attached pic, the tiny transistors (Q2-Q3-Q4-Q5) in the upper left of the EMU1212 image are very likely the electronic "relays" that mute the outputs.



Not all DACs in the market implement that muting function as many audiophiles believe that those circuits might cause sound degradation.
Now, I don't want to enter in the merit of the choices behind muting implementation but the fact is, if no muting is adopted, everything that comes out from the PC is converted to sound, glitches included.
The fact that some DACs implement mute and some not might explain why the "click" problem isn't so widespread (beside the fact that some people may not consider it a problem).

I am almost convinced that MC is doing what it is supposed to do and does it properly. However, although not causing it directly, MC could help circumventing the problem by implementing the simple measure I've proposed earlier and my reasoning is simple: if clicks are proportional to intensity of sound before stop is pressed, allowing through an option to stream a user selectable duration of silence just after stop button is pressed should eliminate the problem before it is generated. :)
Logged

lhwidget

  • World Citizen
  • ***
  • Posts: 127
Re: Skogkatt: Clicks when starting playback
« Reply #22 on: November 06, 2011, 08:48:32 pm »

Thanks for the info.

I hope you get the click to disappear.  I think all of these have been mentioned, but does Play silence



or any of the track change options



or the do not play silence



help?

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #23 on: November 07, 2011, 07:37:24 am »

Thanks for the suggestions.

Unfortunately the settings you proposed did not solve the problem as clicks are still there.

A couple of things:

1) from the pics you posted, "play files from memory instead of disk" appears unchecked: checking this option provides a small sound quality (subjective, I know...) improvement and it is certainly worth to try.

2) In my system "stop: fade (slow/normal/fast)" doesn't fade sound when pressing stop (when music is still playing) and sound is always cut immediately: please, it would be nice if you and others would take a moment to try this and report your findings.

Thanks
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Skogkatt: Clicks when starting playback
« Reply #24 on: November 07, 2011, 07:42:25 am »

Have you tried this thread?
http://tinyurl.com/ck9svg
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Skogkatt: Clicks when starting playback
« Reply #25 on: November 07, 2011, 09:27:06 am »

I am almost convinced that MC is doing what it is supposed to do and does it properly. However, although not causing it directly, MC could help circumventing the problem by implementing the simple measure I've proposed earlier and my reasoning is simple: if clicks are proportional to intensity of sound before stop is pressed, allowing through an option to stream a user selectable duration of silence just after stop button is pressed should eliminate the problem before it is generated. :)

Good idea.

The ASIO in this test plugin post-rolls silence on stop:
http://files.jriver.com/temp/out_main.dll

Replace the copy in your MC\Plugins folder and see if it helps.  Again, it only changes ASIO so don't test WASAPI.

Let us know what you find.
Logged
Matt Ashland, JRiver Media Center

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #26 on: November 07, 2011, 10:41:45 am »

Matt,

thanks, unfortunately the new dll gives me an error (C000005) as soon I try to play anything, crashing MC.
The "playback options" panel is completely empty. Tried rebooting and/or downloading again the dll but that didn't
solve the problem. Renaming back the old dll (I replaced the old one renaming it out_main_old) MC restarted and
works as usual (even without rebooting Windows).

Sorry, I can't determine if the downloaded file is corrupted but just noticed that size differs if compared to the regular
one: 1152KB vs. 1151KB (as reported by Windows).
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Skogkatt: Clicks when starting playback
« Reply #27 on: November 07, 2011, 11:14:36 am »

I was afraid of that.  It requires a newer version of the core than is publicly available.

Install this build, then replace the output plugin (this build is not recommended for the general public, as it has a few bugs we're working on):
http://files.jriver.com/mediacenter/test/MediaCenter170029.exe
Logged
Matt Ashland, JRiver Media Center

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #28 on: November 07, 2011, 11:56:35 am »

Matt,

it works a treat!!! Seriously, no clicks whatsoever: now it behaves as it should (or, as I always hoped)!

Many thanks!!!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Skogkatt: Clicks when starting playback
« Reply #29 on: November 07, 2011, 12:42:16 pm »

Could you test this build:
http://files.jriver.com/mediacenter/test/MediaCenter170xxx.exe

I switched the amount of silence to a smaller amount (hardware latency + 30%).  If it's sufficient, I don't think we even need to make this optional -- ASIO could always output that much silence on stop.

Thanks.
Logged
Matt Ashland, JRiver Media Center

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #30 on: November 07, 2011, 02:05:10 pm »

From a quick test this build behaves like the previous one: still no clicks at 44.1kHz.

May I ask what "hardware latency +30%" means in terms of time (seconds or fraction of seconds)?

If you think it might be relevant, tomorrow I can run some additional tests at higher sample rates than 44.1kHz

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Skogkatt: Clicks when starting playback
« Reply #31 on: November 07, 2011, 02:12:49 pm »

From a quick test this build behaves like the previous one: still no clicks at 44.1kHz.

May I ask what "hardware latency +30%" means in terms of time (seconds or fraction of seconds)?

If you think it might be relevant, tomorrow I can run some additional tests at higher sample rates than 44.1kHz

The hardware latency is the size of the hardware buffer.  Normally it's a small fraction of a second.  It's common for 8192 blocks to be the largest hardware buffer size, so at 44,100 blocks per second, that's 186ms, or about 1/4 of a second once you add the 30%.
Logged
Matt Ashland, JRiver Media Center

lhwidget

  • World Citizen
  • ***
  • Posts: 127
Re: Skogkatt: Clicks when starting playback
« Reply #32 on: November 07, 2011, 05:36:29 pm »

Thanks for the suggestions.

Unfortunately the settings you proposed did not solve the problem as clicks are still there.

A couple of things:

1) from the pics you posted, "play files from memory instead of disk" appears unchecked: checking this option provides a small sound quality (subjective, I know...) improvement and it is certainly worth to try.

2) In my system "stop: fade (slow/normal/fast)" doesn't fade sound when pressing stop (when music is still playing) and sound is always cut immediately: please, it would be nice if you and others would take a moment to try this and report your findings.

Thanks

Thanks for the tip.

As to #2 above, the different fade times all work as they should immediate, fast, norm & slow are progressively longer.  (Remember, I'm still on 16.0.181)

Glad you are getting fixed up, these guys are good  :)

Skogkatt

  • Junior Woodchuck
  • **
  • Posts: 75
Re: Skogkatt: Clicks when starting playback
« Reply #33 on: November 09, 2011, 08:16:27 am »

Quote
Thanks for the tip.

As to #2 above, the different fade times all work as they should immediate, fast, norm & slow are progressively longer.  (Remember, I'm still on 16.0.181)


Thanks for your feedback on the fade on stop which still refuses to work on my system. However, that was just a workaround for fixing the click problem (now solved with 17.0.31).

Quote

Glad you are getting fixed up, these guys are good  :)


Yes, absolutely! ;D They are extremely good!!!
Logged
Pages: [1]   Go Up