Author Topic: 3.1.6512: distortion when playing audio with much different samplerates via ASIO  (Read 11348 times)

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
After the test requested above, could you restart MB and play the track that played at the wrong sample rate again and also send those results

21.05.2019 19:45:18 - BASS_ASIO_ChannelSetRate(44100,14):True
21.05.2019 19:45:18 - BASS_ASIO_SetRate:True
21.05.2019 19:46:38 - BASS_ASIO_ChannelSetRate(96000,14):True
21.05.2019 19:46:38 - BASS_ASIO_SetRate:True
21.05.2019 19:48:40 - BASS_ASIO_ChannelSetRate(96000,14):True
21.05.2019 19:48:40 - BASS_ASIO_SetRate:True


Maybe to make it clear, there is no "problem sample rate".
The "switching" of one to another sample rate is the problem if the you change from single to double or to quad speed.
Not from 44.1 to 48, but from 44.1 to double (88.2/96) or quad speed (192)

Play something at 44.1 .. select other title with 96 kHz -> issue.
Restart MusicBee, continue playing last title with 96 kHz -> works.

What should work is to be able to select / play songs of any sample rate in one MusicBee session.

When the sample rate is being changed from single to double or quad two things happen:
- ASIO buffer size changes it doubles from single to double and again from double to quad speed
- Amount / Numbering of channels changes, because the amount of ADAT and MADI channels changes
   IF I use AES of UFX+ no change in assignment.
   But if I use the ADI-2 Pro via USB, then the channel assignment becomes wrong as it is not being adjusted.

For ADAT and MADI double speed is being achieved by bonding two, quad speed by bonding 4 channels.

I noticed already that the assignment in MusicBee of Left and Right channel is wrong,
when the amount of channels changes when changing between single / double / quad speed.

Here the list/order of channels and ASIO buffer size as example depening one sample rate:
https://www.dropbox.com/s/6sio1qwf4bw9nec/MADface%20Channel%20Mapping%20UFX%2B%20and%20ADI-2%20Pro.pdf?dl=1

I think the 1st important milestone would be to assume that the channel assignment for Left and Right channel
does not change .. this is the case when I playback via UFX->AES->ADI-2 Pro and get sample rate change stable.

2nd important step would be that MusicBee becomes aware of the exact amount of channels depending on sample rate.
Example: if I playback @44.1 via USB directly to ADI-2 Pro then its channel 95 and 96, but @96 its 55+56
and @192 its 35+36.
Last Edit: May 21, 2019, 07:52:18 PM by tubescreamer


tubescreamer

  • Jr. Member
  • **
  • Posts: 83
could you run this debug version and send me the info at the end of the error log

https://www.mediafire.com/file/v8yyjayg4k8kd5k/MusicBeeDebugAsio.zip/file

Sure, sorry, had no time the last days.
Now the switching between all sample frequencies works, very nice.

To present you a short informative debug file I tested now exactly this szenario:
- 2 FLAC files (44.1 kHz and 96 kHz)
- ASIO buffersize: 32 samples @44.1 kHz, changes to 64 samples @96 kHz)
11:49:45 - Start of MusicBee
12:00:00 - Start of 44.1 kHz FLAC file (by double clicking to the file on desktop)
12:00:15 - Start of 96 kHz FLAC file (by double clicking to the file on desktop)
12:00:30 - Start of 44.1 kHz FLAC file (by double clicking to the file on desktop)
12:00:45 - Manually stopped MusicBee

26.05.2019 11:59:19 - ASIO reset join
26.05.2019 12:00:01 - ASIO Set rate=44100 (Comment: start of 1st FLAC file)
26.05.2019 12:00:01 - ASIO Set rate2
26.05.2019 12:00:01 - ASIO already started=False
26.05.2019 12:00:01 - ASIO started
26.05.2019 12:00:15 - ASIO Pause (Comment: start of 2nd FLAC file)
26.05.2019 12:00:15 - ASIO Stop2
26.05.2019 12:00:16 - ASIO Set rate=96000
26.05.2019 12:00:16 - ASIO Set rate2
26.05.2019 12:00:16 - ASIO already started=False
26.05.2019 12:00:16 - ASIO started
26.05.2019 12:00:30 - ASIO Pause (Comment: start of 1st FLAC file again)
26.05.2019 12:00:30 - ASIO Stop2
26.05.2019 12:00:31 - ASIO Set rate=44100
26.05.2019 12:00:31 - ASIO Set rate2
26.05.2019 12:00:31 - ASIO already started=False
26.05.2019 12:00:31 - ASIO started
(Comment: stop of playback is not recorded in the sebug log)

What does not work is, if you change the ASIO buffersize during playback, this hangs MusicBee completely.
Nothing helps, different title selection does not restart playback. You can only exit MusicBee and restart.

In this case I started playback of 44.1 kHz FLAC file at around 12:10:00 with ASIO buffersize of 32 samples.
At 12:10:15 I changed ASIO buffersize from 32 to 256 samples and MusicBee immediately stops playing.
At 12:10:30 I changed the buffersize down to 128 samples, still hangs
At 12:10:35 I changed the buffersize down to 64   samples, still hangs
At 12:10:40 I changed the buffersize down to 32   samples, still hangs
At 12:11:45 I tried to stop and restart playing, still hangs
At 12:12:00 I choosed a different FLAC file with 96 kHz, still hangs, start and stop no success.

26.05.2019 12:09:56 - ASIO reset join
26.05.2019 12:10:04 - ASIO Set rate=44100
26.05.2019 12:10:04 - ASIO Set rate2
26.05.2019 12:10:04 - ASIO already started=False
26.05.2019 12:10:04 - ASIO started
26.05.2019 12:10:30 - asioevent=2
26.05.2019 12:10:59 - ASIO Pause
26.05.2019 12:10:59 - ASIO Stop2
26.05.2019 12:11:00 - ASIO Set rate=96000
26.05.2019 12:11:00 - ASIO Set rate2
26.05.2019 12:11:00 - ASIO already started=False
26.05.2019 12:11:00 - ASIO started

Many thanks for your investigations.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
Could you try this version - it doesnt log any debug info. I have now put in some handling for the buffersize change, but could you also reconfirm the rate change test as well

https://getmusicbee.com/patches/MusicBee33_Patched.zip


tubescreamer

  • Jr. Member
  • **
  • Posts: 83
Sample rate changes work properly.

What irritates me a little is, that the RME driver settings window shows different ASIO buffer sizes for UFX+ and ADI-2 Pro after changing to a song with a different sample rate.

Example: I kept the RME driver setting window open and then playback:
@44.1: UFX+ 32, ADI-2 Pro 32 -> OK
when changing song to 96 kHz:
@96 kHz: UFX 64, ADI-2 Pro 32 (should also be 64) -> unexpected (but works)

After closing RME driver settings dialog and reopening: both are at 64 samples which is correct.
I think this is maybe something where RME might need to take a look.

What not works is still changing the ASIO buffersize while playback, then musicbee hangs and doesn't play a song anymore without a full restart of the application.

P.S.: in previous tests I only replaced the MusicBee.exe, this time I replaced all files from your ZIP archive, to be on the save side that I perform a proper test for you.

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
FYI
I performed a Win10 upgrade installation to 2nd SSD to Win10 1809.
Same behaviour like with Win7.
So I will proceed testing with Win7 as it makes no difference and as Win7 is still my preferred Windows environment.


tubescreamer

  • Jr. Member
  • **
  • Posts: 83
Many thanks.
No this also does not work.
Sample rate changes yes, ASIO buffer sizes no.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
No this also does not work.
I think the next thing i could try is too much of a change. I expect dynamically handling the changing of the buffer size is not a common requirement so I will leave this unsolved
Last Edit: May 26, 2019, 04:13:13 PM by Steven

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
No this also does not work.
I think the next thing i could try is too much of a change. I expect dynamically handling the changing of the buffer size is not a common requirement so I will leave this unsolved

There are certain steps required when changing the buffersize during playback, but then it works.
In Cubase I get an interruption of about 2 seconds and then the application continues.

You can send your contact at RME an e-mail, then he is happy to detail to you the necessary steps,
so that MusicBee could also perform very well in situations like ASIO buffer changes.

Testing with a local connected ASIO device might be more efficient for you and then you see yourself how well it does.
Last Edit: May 26, 2019, 08:35:27 PM by tubescreamer

bitfidelity

  • Jr. Member
  • **
  • Posts: 32
I didn't realize this was fixed until I switched to some of my 192 kHz Star Wars soundtracks just now. Good job!

AFAIK, ASIO is supposed to hang and act funny if you try to switch the buffer size during playback.

tubescreamer

  • Jr. Member
  • **
  • Posts: 83
I didn't realize this was fixed until I switched to some of my 192 kHz Star Wars soundtracks just now. Good job!

AFAIK, ASIO is supposed to hang and act funny if you try to switch the buffer size during playback.

I discussed this with RME, this is not the case when being implemented correctly.
You should be able to do this in every DAW (Cubase, Protools, Reaper, ...).

The main issue has been fixed btw, you can change now between songs with different sample rate with no issues.
Many thanks again, that this could be fixed.

Change of ASIO buffersize during playback will stay unsolved, but is maybe not a burning issue for pure audio playback,
as it is very unlikely that it is being changed.