Menu

#4 Additional endpoint buffer size frequencies request

1.0
open
nobody
None
2016-04-19
2016-04-09
Upgradeplus
No

Hi Didier.

I am a spanish speaker, so apologize for my poor english

My configuration is:

Gigabyte Brix headless pc with intel J1900 (2Ghz) and 4Gb RAM. (GB-BXBT-1900)
(Win 10. Foobar2K)
DAC: Arcam irDAC (no DSD support. Supported sample rates: 44.1kHz, 48kHz, 88.2kHz, 96kHz, 192kHz capable via USB II) with last Arcam ASIO driver.

DAC Settings:
USB Streaming mode: Minimum Latency.
ASIO Buffer size: Auto

So I have to downsample my sacd.iso files. Foobar SACD setting: PCM Samplerate: 176400

Until now my ASIO2 settings are:
Use AVX/AVX2 intructions: NO (not suported by J1900)
Sample cache factor: 0 (all freq ranges)

Endpoint buffer size:

ASIOGetBufferSize (min:80, max:80, preferred:80, granularity:0)
[16:42:36] Renderer::init_asio_static_data - ASIOGetSampleRate (sampleRate:44100.0000000)
[16:42:36] Renderer::init_asio_static_data - ASIOOutputReady(); - 0
[16:42:36] Renderer::InitAudioClient - chunk size aligned on endpoint buffer size - chunk size = 4096 , endpoint buffer size = 64
[16:42:36] ASIOGetLatencies (input: 108, output: 108

ASIOGetBufferSize (min:80, max:80, preferred:80, granularity:0)
[16:44:42] Renderer::init_asio_static_data - ASIOGetSampleRate (sampleRate:48000.0000000)
[16:44:42] Renderer::init_asio_static_data - ASIOOutputReady(); - 0
[16:44:42] Renderer::InitAudioClient - chunk size aligned on endpoint buffer size - chunk size = 4608 , endpoint buffer size = 64
[16:44:42] ASIOGetLatencies (input: 112, output: 112

88,2 Khz files:
ASIOGetBufferSize (min:80, max:80, preferred:80, granularity:0)
[16:58:19] Renderer::init_asio_static_data - ASIOGetSampleRate (sampleRate:88200.0000000)
[16:58:19] Renderer::init_asio_static_data - ASIOOutputReady(); - 0
[16:58:19] Renderer::InitAudioClient - chunk size aligned on endpoint buffer size - chunk size = 4608 , endpoint buffer size = 256
[16:58:20] ASIOGetLatencies (input: 344, output: 344

96 Khz files:
ASIOGetBufferSize (min:80, max:80, preferred:80, granularity:0)
[16:46:31] Renderer::init_asio_static_data - ASIOGetSampleRate (sampleRate:96000.0000000)
[16:46:31] Renderer::init_asio_static_data - ASIOOutputReady(); - 0
[16:46:31] Renderer::InitAudioClient - chunk size aligned on endpoint buffer size - chunk size = 4608 , endpoint buffer size = 256
[16:46:31] ASIOGetLatencies (input: 352, output: 352

Here comes my question...

When I use here [96 Khz - 384 Khz]:4096 (minimum buffer size without block shortage occurences with sacd.iso files at 176400 Khz)

192 Khz files goes ok:

ASIOGetBufferSize (min:144, max:144, preferred:144, granularity:0)
[16:50:28] Renderer::init_asio_static_data - ASIOGetSampleRate (sampleRate:192000.0000000)
[16:50:28] Renderer::init_asio_static_data - ASIOOutputReady(); - 0
[16:50:28] Renderer::InitAudioClient - chunk size aligned on endpoint buffer size - chunk size = 4096 , endpoint buffer size = 4096
[16:50:28] ASIOGetLatencies (input: 4288, output: 4288

But when I Play sacd.iso files PCM 176400

ASIOGetBufferSize (min:144, max:144, preferred:144, granularity:0)
[16:54:41] Renderer::init_asio_static_data - ASIOGetSampleRate (sampleRate:176400.0000000)
[16:54:41] Renderer::init_asio_static_data - ASIOOutputReady(); - 0
[16:54:41] Renderer::InitAudioClient - chunk size not aligned on endpoint buffer size - chunk size = 2352 , endpoint buffer size = 4096
[16:54:42] ASIOGetLatencies (input: 4272, output: 4272

So... I think it´ll be a good idea to separate freq options. for ex.
[96 Khz - 176,40 Khz]
[176,40 Khz - 192 Khz] and finally perhaps
[192 Khz - 282.24 Khz]
[282,24 Khz - 384 Khz]

What do yo think?

Can you do this please? Is it possible?

Kind regards
Gus

Discussion

  • Didier Galardon

    Didier Galardon - 2016-04-12

    Hello Gus,

    Don't worry, I am a french guy and my english is not very good neither.
    May you explain me what bother you when listening to sacd.iso files PCM 176400 ?
    playback doesn't work at all ? or is this related to the message "chunk size not aligned..." in your log ?
    In the former case, may you give you more explanations ?
    in the latter case, it is not that important. If the audio chunk size is aligned on the endpoint buffer size, chunk may be processed in a more direct way and thus in theory gives a slightly better sound. The problem is that the size of the chunk depends on the way the input audio data is read or processed by foobar (dsd vs pcm vs mp3 vs streamed data.., use of DSP or not), and cannot be changed by the asio2 output component. On the other side, I am not sure that it worth it to split buffer size setting in your case, because, as you say, you need at least a size of 4096 for 176,4Khz, and 4096 is also ok for 192Khz. May be it could worth it for higher frequencies. I will see if I have other demands like yours.

    Kind regards,

    Didier

     
  • Upgradeplus

    Upgradeplus - 2016-04-17

    Hi Didier!

    Thanks for your response.

    As you said, my concern was about "chunk size not aligned on endpoint buffer size" when playing sacd.iso files PCM 176400.
    So, if this is not an issue, I will keep it like that.

    It would be useful for other users the solution that I had found about an issue I had. When I tried to play some 24 bits/44,1 Khz files, Foobar stopped and reinitialized at the very beginning. I find that the problem was "Use Chunk Alignment Optimization" checked. Unchecking this solved the problem.

    I've tested some configurations and finally this is until now:

    Arcam iRDac settings:
    USB Streaming Mode: Minimum Latency
    ASIO Buffer Size: 256 Samples

    ASIO2 settings:
    All Settings unchecked except:
    Use SIMD Instructions
    Disable DWM MMCSS

    Sample cache factor all freq.: 512
    Why I use Sample cache factor all freq. 512? I've tried 256 (with the Driver endpoint config. settings as below) but the ASIO Arcam driver didn´t wake up de DAC (!)

    Driver endpoint config.:
    ...44,1 Khz: 64
    ...48 Khz: 64
    ...96 Khz: 128
    ...384 Khz: 256

    With these configuration the audio seems correct and I've got these Latencies:

    ASIOGetLatencies
    44,1 Khz: input: 108, output: 108
    48 Khz: input: 112, output: 112
    88,2 Khz: input: 216, output: 216
    96 Khz: input: 224, output: 224
    176,4 Khz: input: 432, output: 432
    192 Khz: input: 448, output: 448

    Playing Bill Evans "Do It for your love" (24 bits-192 Khz)
    This is the resulting log:

    [14:28:14] output_wasap2_playback::on_playback_starting - BEGIN
    [14:28:14] output_wasap2_playback::syncPhase - BEGIN
    [14:28:14] output_wasap2_playback::syncPhase - Current playlist is : #L -Library
    [14:28:14] output_wasap2_playback::syncPhase - nb items = 1
    [14:28:14] output_asio2_impl::get_specific_device - guid found
    [14:28:14] output_asio2_impl::intrinsics support : SSE = 1
    [14:28:14] output_asio2_impl::intrinsics support : SSE2 = 1
    [14:28:14] output_asio2_impl::intrinsics support : SSE3 = 1
    [14:28:14] output_asio2_impl::intrinsics support : SSSE3 = 1
    [14:28:14] output_asio2_impl::intrinsics support : SSE4.1 = 1
    [14:28:14] output_asio2_impl::intrinsics support : SSE4.2 = 1
    [14:28:14] output_asio2_impl::intrinsics support : SSE4a = 0
    [14:28:14] output_asio2_impl::intrinsics support : AVX = 0
    [14:28:14] output_asio2_impl::intrinsics support : AVX2 = 0
    [14:28:14] SetVolumeOnSession - volume scale = 0.7079458
    [14:28:14] output_asio2_impl::pause - state = 0
    [14:28:14] output_asio2_impl::pause - m_renderer->ResumePlaybackAsync failed: hr =-2147019873
    [14:28:14] Opening track for playback: "D:\Flac 24 Bits\Bill Evans\Bill Evans Trio - Affinity (1978) [201] 24-192\1-I Do It For Your Love.flac"
    [14:28:14] output_asio2_impl::setTrackInfo - bInvertPhaseFlag = 0, bNextInvertPhaseFlag = 0
    [14:28:14] output_asio2_impl::stop -
    [14:28:14] output_asio2_impl::open - asioVersion:0, driverVersion:796, Name:Arcam ASIO Driver, ErrorMessage:No ASIO Driver Error
    [14:28:14] Renderer::init_asio_static_data - ASIOGetChannels (inputs:0, outputs:2)
    [14:28:14] Renderer::init_asio_static_data - ASIOGetBufferSize (min:256, max:256, preferred:256, granularity:0)
    [14:28:15] Renderer::init_asio_static_data - ASIOGetSampleRate (sampleRate:192000.0000000)
    [14:28:15] Renderer::init_asio_static_data - ASIOOutputReady(); - 0
    [14:28:15] ASIOGetLatencies (input: 448, output: 448
    [14:28:15] ASIOSTInt32LSB buf type
    [14:28:15] ASIOSTInt32LSB buf type
    [14:28:15] Renderer::16 bytes Alignment of Asio buffers = 1
    [14:28:15] Device Format(set for track).wFormatTag = unknown
    [14:28:15] Device Format(set for track).nChannels =2
    [14:28:15] Device Format(set for track).nSamplesPerSec =192000
    [14:28:15] Device Format(set for track).nAvgBytesPerSec =1536000
    [14:28:15] Device Format(set for track).nBlockAlign =8
    [14:28:15] Device Format(set for track).wBitsPerSample =32
    [14:28:15] Device Format(set for track).cbSize =0
    [14:28:15] SetVolumeOnSession - volume scale = 0.7079458
    [14:28:15] Renderer::InitCache - Cache ratio = 512 , Chunk size (samples) = 4096
    [14:28:15] Renderer::InitCache - Sample cache initialized - cache size (samples) = 131072, using Heap memory
    [14:28:15] ASIO Driver started successfully.
    [14:28:16] HDD wakeup - touching file: D:{A53AE67A-5343-4E7C-9C19-63BC430EA8C7}
    [14:28:16] HDD wakeup - touched file: D:{A53AE67A-5343-4E7C-9C19-63BC430EA8C7}
    [14:28:16] Renderer::Renderer waits for samples - total block shortage occurences since playing has been starting = 8
    -

    I have some questions about this log:

    1) [14:28:14] output_asio2_impl::pause - m_renderer->ResumePlaybackAsync failed: hr =-2147019873
    The "failed" means something relevant?

    2) [14:28:15] Renderer::InitCache - Sample cache initialized - cache size (samples) = 131072, using Heap memory
    What's the meaning of "using Heap memory"?

    3) [14:28:16] Renderer::Renderer waits for samples - total block shortage occurrences since playing has been starting = 8
    What does it means? I read that this is normal issue when a file is being played.

    By the way: you have done a great job with this component and the audio improvement with it is amazing!

    Best regards,
    Gus

     
  • Didier Galardon

    Didier Galardon - 2016-04-19

    Hi Gus!

    Normally you might have to uncheck "Use Chunk Alignment Optimization" box when using some specific types of audio source (streaming,mp3 typically) or when using some DSP (e.g. the sox resampler), for which input chunk size may vary during playback, making asio2 unable to maintain chunk alignment. It seems strange to me that you cannot keep box checked with normal PCM input. I will have to verify this. But anyway, as I said before, you can keep the option unckecked: chunk alignment is just an optimization.

    your configuration seems ok. I don't understand very well your problem with sample cache factor=256. Do you mean that playback hangs ? The sample cache factor defines the size of the memory cache of samples used by the asio2 plugin. Normally you could used a lower value than 512 (which, given your endpoint config, corresponds to a cache size of 132072 samples (512 * 256) for 192Khz tracks). It is the reason why you get the message "using Heap memory" in the log, which means that Asio2 allocates cache memory in the heap segment, because it is too big to be allocated in the data segment (asio2 plugin limits itself to 16Kbytes per channel, which corresponds to 4k samples, which in your case would require a sample cache factor set to 16 max for 192 Kz, 32 max for 92 Khz). Anyway, all this IT stuff is just an optimization, and I'm not even sure that it makes any difference.

    Concerning your other questions regarding the log:

    1) failed log on on ResumePlaybackAsync --> dont' bother with this, this is just garbage log.
    3) block shortage occurences : this is normal as long as, as in your case, nb of occurences don't increase too much and too quickly. block shortage cannot be totally avoided between while foobar is loading metadata when switching between tracks, but normally you shouldn't hear anything except silence.

    King regards

    Didier

     

Log in to post a comment.