Upsampled files cut off before end

Audirvana Mac Version 3.5.37 (3567)
macOS 10.15.5 with 16384MB RAM

Registered to Jim Cleveland

SIGNAL PROCESSING:

Polarity Inversion:
	Globally: OFF
	Per track: OFF
Effects plugins ACTIVE in offline mode
	AU plugin #0: Music Effect - Waves Abbey Road Vinyl (s) ()
	AU plugin #1: Effect - Goodhertz Ghz CanOpener Studio 3 ()
	AU plugin #2: Effect - Sonarworks Sonarworks Reference 4 ()
	AU plugin #3: None

UPSAMPLING:
SoX with Power Of Two upsampling
SoX filter parameters
Bandwidth at 0dB = 99.5
Filter max length = 30000
Anti-aliasing = 100
Phase = 66

AUDIO VOLUME:
Max allowed volume: 100
Replay Gain: None
SW volume control: ON

LIBRARY SETTINGS:
Sync list: 0 folders
iTunes/Music library synchronization: last synchronized on Fri Jun 12 09:47:14 2020

Library database path: /Users/jinky/Library/Application Support/Audirvana/AudirvanaPlusDatabaseV2.sqlite

ACTIVE STREAMING SERVICES

=================== AUDIO DEVICE ========================

CoreAudio audio path, buffer I/O frame size: 512

Max. memory for audio buffers: 4096MB

Local Audio Engine:
Exclusive access: Enabled
Integer mode: Enabled

Preferred device:
Mojo
Model UID:Mojo:245F:0815
UID:AppleUSBAudioEngine:Chord Electronics Ltd:Mojo:413-001:2

Active Sample Rate: 44.1kHz
Hog Mode is off

Bridge settings:
Sample rate limitation: none
Sample rate switching latency: none
Limit bitdepth to 24bit: OFF
Mute during sample rate change: ON

Selected device:
Local audio device
ID 0x4b Mojo Manufacturer:Chord Electronics Ltd
Model UID:Mojo:245F:0815 UID:AppleUSBAudioEngine:Chord Electronics Ltd:Mojo:413-001:2

11 available sample rates up to 768000Hz
32000
44100
48000
88200
96000
176400
192000
352800
384000
705600
768000
Audio buffer frame size : 14 to 4096 frames
Current I/O buffer frame size : 512
Volume Control
Physical: Yes
Virtual: Yes
MQA capability
Auto-detect MQA devices: No
Not a MQA device, user set to not MQA
DSD capability: Unhandled
Device audio channels
Preferred stereo channels L:1 R:2
Channel bitmap: Ox3, layout:
Channel 0 mapped to 0
Channel 1 mapped to 1

Audio channels in use
Number of channels: 2
Use as stereo device only: No
Simple stereo device: Yes

1 output streams:
Number of active channels: 2, in 1 stream(s)
Channel #0 :Stream 0 channel 0
Channel #1 :Stream 0 channel 1

Stream ID 0x4c 2 channels starting at 1
22 virtual formats:
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 768kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 705.6kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 384kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 352.8kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 192kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 176.4kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 96kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 88.2kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 48kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 44.1kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Float 32kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 768kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 705.6kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 384kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 352.8kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 192kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 176.4kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 96kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 88.2kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 48kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 44.1kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 32kHz

22 physical formats
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 768kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 705.6kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 384kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 352.8kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 192kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 176.4kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 96kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 88.2kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 48kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 44.1kHz
2 ch Mixable linear PCM Interleaved 32 little endian Signed Integer 32kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 768kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 705.6kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 384kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 352.8kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 192kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 176.4kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 96kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 88.2kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 48kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 44.1kHz
2 ch Non-mixable linear PCM Interleaved 32 little endian Signed Integer 32kHz

Local devices found : 4
Device #0: ID 0x3d Built-in Output Manufacturer: Apple Inc. Model UID: AppleHDA:128 UID: AppleHDAEngineOutput:1B,0,1,1:0
Device #1: ID 0x47 DisplayPort Manufacturer: Apple Inc. Model UID: AppleHDA:128 UID: AppleHDAEngineOutputDP:0,1,0,1,4:0:{D109-801E-00005445}
Device #2: ID 0x4b Mojo Manufacturer: Chord Electronics Ltd Model UID: Mojo:245F:0815 UID: AppleUSBAudioEngine:Chord Electronics Ltd:Mojo:413-001:2
Device #3: ID 0x2a :o: Audio Out Manufacturer: Rogue Amoeba Software, Inc. Model UID: com.rogueamoeba.ACE:proxy UID: com.rogueamoeba.Loopback:CB065605-7BC1-499F-8F46-CA73F5E2D236

UPnP devices found : 0

When you deactivate upsampling, do you still have the issue?

I will check it next time I get an error and post a reply (could be a few days)

PLAYBACK 1
Playing an album with my normal setup:

  • Audio units on
  • Upsampling type = “Power of Two”

Sampling rate = 705.6k
Last track cuts off a few seconds early

PLAYBACK 2
I make no changes to settings.
I just play the last track again.

Sampling rate = 705.6k
Last track cuts off a few seconds early

PLAYBACK 3
I deactivate upsampling.

Sampling rate = 44.1k
Last track plays completely

PLAYBACK 4
I change Upsampling type = “Power of Two”

Sampling rate = 705.6k
Last track cuts off a few seconds early

UPDATE

In the last post it looks like the upsampling is causing the problem.
So I changed the Upsampling Type from “Power of 2” to “custom”.
Then I set lowered the sampling rate from 705.6k to 176.4k

No tracks have been cut off so far.
This includes the tracks that cut off before (in above posts).

The only real difference that I can see is the progress bar:

  • At 176.4k it shows the whole track is upsampled at the start
  • At 705.6k it is upsampled in multiple chunks

So, perhaps the problem is not “upsampling”, but “upsampling in steps”

Hi @jinky, interesting observation about the upsampling setting. I’m normally using power of 2 as well, I’m going to try something else.

When you have tracks ending prematurely, do you observe the same progress bar behaviour as I have posted in the other thread (Play stops just before end of title)?

Yes, it sounds like the same issue I am having.
Nice writeup by the way :wink:

Any of our explanations is at best an educated guess, as we are essentially doing “black box testing” (we don’t see the code).

With that in mind, at the moment I think the problem occurs when a track is processed in multiple steps (essentially, the internal buffer is not large enough to hold all the samples at once).
Why that happens …no idea !

Reality is that the kind of code required to support:

  • upsampling
  • audio units
  • all the other audio formats and sample types
  • local files and a streaming service
  • maximum buffer sizes
  • …etc

…is going to be complex.

So my goal is to give the devs as much info as I can, in the hope it helps !

I have the same exact issue, last 6 seconds cuts off with upsampling on. Heres my debug:

Audirvana 3.5.38

SIGNAL PROCESSING:

Polarity Inversion:
	Globally: OFF
	Per track: OFF
Effects plugins NOT ACTIVE

UPSAMPLING:
SoX with Power Of Two upsampling
SoX filter parameters
Bandwidth at 0dB = 99.5
Filter max length = 30000
Anti-aliasing = 100
Phase = 66

AUDIO VOLUME:
Max allowed volume: 100
Replay Gain: None
SW volume control: OFF

LIBRARY SETTINGS:
Sync list: 1 folders
AUTO: D:\MUSIC
Library database path: C:\Users\nelso\AppData\Local\Audirvana\AudirvanaPlus\AudirvanaPlusDatabaseV2.sqlite

ACTIVE STREAMING SERVICES
TIDAL: Connected as HIFI

=================== AUDIO DEVICE ========================

Max. memory for audio buffers: 3010MB

Local Audio Engine:WASAPI

Preferred device:
Speakers (SMSL USB DAC)
Model UID:Speakers (SMSL USB DAC)
UID:\?\SWD#MMDEVAPI#{0.0.0.00000000}.{53bb1ba7-1fff-4dd9-af97-a1fd9eda3257}#{e6327cad-dcec-4949-ae8a-991e976a79d2}

Active Sample Rate: 96kHz

Bridge settings:
Sample rate limitation: none
Sample rate switching latency: none
Limit bitdepth to 24bit: OFF
Mute during sample rate change: OFF

Selected device:
Local audio device
Speakers (SMSL USB DAC) Manufacturer:
Model UID:Speakers (SMSL USB DAC) UID:\?\SWD#MMDEVAPI#{0.0.0.00000000}.{53bb1ba7-1fff-4dd9-af97-a1fd9eda3257}#{e6327cad-dcec-4949-ae8a-991e976a79d2}

10 available sample rates up to 768000Hz
44100
48000
88200
96000
176400
192000
352800
384000
705600
768000
Volume Control
Physical: No
Virtual: No
MQA capability
Auto-detect MQA devices: No
Not a MQA device, user set to MQA Renderer
DSD capability: DSD via PCM 1.1
Device audio channels
Preferred stereo channels L:0 R:1
Channel bitmap: Ox3, layout:
Channel 0 mapped to 0
Channel 1 mapped to 1

Audio channels in use
Number of channels: 2
Use as stereo device only: No
Simple stereo device: No

1 output streams:
Number of active channels: 2, in 1 stream(s)
Channel #0 :Stream 0 channel 0
Channel #1 :Stream 0 channel 1
2 ch Integer PCM 16bit little endian 44.1kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 44.1kHz
2 ch Integer PCM 32bit little endian 44.1kHz
2 ch Integer PCM 16bit little endian 48kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 48kHz
2 ch Integer PCM 32bit little endian 48kHz
2 ch Integer PCM 16bit little endian 88.2kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 88.2kHz
2 ch Integer PCM 32bit little endian 88.2kHz
2 ch Integer PCM 16bit little endian 96kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 96kHz
2 ch Integer PCM 32bit little endian 96kHz
2 ch Integer PCM 16bit little endian 176.4kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 176.4kHz
2 ch Integer PCM 32bit little endian 176.4kHz
2 ch Integer PCM 16bit little endian 192kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 192kHz
2 ch Integer PCM 32bit little endian 192kHz
2 ch Integer PCM 16bit little endian 352.8kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 352.8kHz
2 ch Integer PCM 32bit little endian 352.8kHz
2 ch Integer PCM 16bit little endian 384kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 384kHz
2 ch Integer PCM 32bit little endian 384kHz
2 ch Integer PCM 16bit little endian 705.6kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 705.6kHz
2 ch Integer PCM 32bit little endian 705.6kHz
2 ch Integer PCM 16bit little endian 768kHz
2 ch Integer PCM 24bit little endian aligned high in 32bit chunk 768kHz
2 ch Integer PCM 32bit little endian 768kHz

Local devices found : 3
Device #0: Digital Audio (S/PDIF) (High Definition Audio Device) Manufacturer: Model UID: Digital Audio (S/PDIF) (High Definition Audio Device) UID: \?\SWD#MMDEVAPI#{0.0.0.00000000}.{3959b2d9-7126-4bdf-95a5-5c285c342cf8}#{e6327cad-dcec-4949-ae8a-991e976a79d2}
Device #1: Digital Audio (S/PDIF) (High Definition Audio Device) Manufacturer: Model UID: Digital Audio (S/PDIF) (High Definition Audio Device) UID: \?\SWD#MMDEVAPI#{0.0.0.00000000}.{a4eddca6-da28-4316-a4c3-46ca3d28d955}#{e6327cad-dcec-4949-ae8a-991e976a79d2}
Device #2: Speakers (SMSL USB DAC) Manufacturer: Model UID: Speakers (SMSL USB DAC) UID: \?\SWD#MMDEVAPI#{0.0.0.00000000}.{53bb1ba7-1fff-4dd9-af97-a1fd9eda3257}#{e6327cad-dcec-4949-ae8a-991e976a79d2}

UPnP devices found : 0

Hello @schunard99,

Do you also have this issue when you disable it?

That’s exactly right. After some experimentation I can now usually predict whether and when it will happen. Look at the size of the audio buffer you allocated (in seconds), and estimate how many buffer refills will be required for the length of the track.

Watch for the displayed track duration drop suddenly around the time you reach the point of the last buffer refill. This is more straight-forward to calculate when the upsampled rate of the track is equal to one of the two rates shown with the buffer allocation slider. Otherwise you’ll have to interpolate somehow. Sometimes you get a rendering glitch at that exact point (the remaining white bit on the right end of the progress bar), and this makes it easy to spot the point. However, this rendering error does not always happen.

Also, after the track length has dropped, but while the track is still playing, you can reset the track length to its correct value by rewinding to a track position to a point before the drop happened.

The smaller the allocated buffer the more likely you are to suffer from premature track ends. I used to have 2GB allocated. I recently upgraded my Mac mini to 16GB RAM and increased the buffer size to 12GB. I have not noticed any truncated tracks since, even with long tracks that won’t fit into 12GB (I upsample everything to 768/705).

I can still get Audirvana to reliably truncate tracks by setting the buffer allocation back to ~2GB. So this seems to be an issue with smaller buffer allocations only.

Try upsampling to DSD, you might get better results.

Better results in what regard? Avoiding this bug, or sound quality?

The issue will probably still be there, but you might get more pleasing sound.

Google helped me find this thread- looks like the same issue I have been trying to figure out.

Disabling upsampling seems to be a workaround but I just wanted to check that this was still happening to those who were able to reproduce it?

Sorry Damien3, its been a weird summer.
I have no problem with Disabled, x2 only or to DSD.

It’s worst with use maximum frequency. I’m just pretending that setting doesn’t exist now :slight_smile:

Has any solution been found for this? I have been hoping that with all the updates it would have been fixed. It happens to me on all upsampling to DSD and all higher rates of PCM. Most noticeable on long tracks. I am on Windows 10 with 8GB memory. With upsampling to DSD the channels get reversed on every other track as well. I am using Qobuz.

Hello @GB46,

this issue is more related on your DAC manufacturer as it depense en on how they want to deal with upsampling. Some of them want it do be only done by the DAC and it also appears that if you put the setting “maximum frequency” you can have dropouts issue or the song can be cut before the end. Therefore you need to either reduce the setting to “Power of 2” or “x2” to check if you still have the issue.

Many thanks for your swift reply. Using ‘Power of 2’ or ‘device max’ produces the problem. Restricting to ‘x2’ or turning off upsampling works with no problems. Do you think this is also the issue with channel switching (left to right and vice versa) when converting to DSD? For your information the DAC is OPPO 205 via usb input.

We didn’t had such report about it, do you have a setting in your Oppo for channel switching?

No, that is not available, only possible to switch the polarity of the XLR terminals which would I guess be a phase change. It is a bit academic to me though as going to DSD as ‘upsampled’ also causes the cutting short of the tracks (nearly always but depends on the track length.) Incidentally it may not be obvious unless playing classical music where orchestra layout is usually consistent. You find yourself sitting behind the orchestra instead of in front!