camilladsp windows 7 SPDIF for REW IR filters

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
108
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
Hi,

CamillaDSP is exactly the type of software that drives me, and many others, insane. Hundreds of pages of documentation and not a single real life working configuration example.

The case is simple: Windows 7 with SPDIF Output.

Does anyone has a working configuration for it before I give up?

So far, here's what I've done:

listdevices.exe

Code:
Available hosts:
  [Wasapi]
WASAPI
  Default Input Device:
    Ok("Mic 1 (Live! Cam Virtual)")
  Default Output Device:
    Ok("Realtek Digital Output (Realtek High Definition Audio)")
  Devices:


  Device: "CABLE Input (VB-Audio Virtual Cable)"
  ============================================================

    Capture
    ------------------------------------------------------------

    Playback
    ------------------------------------------------------------
    Default output stream config:
      channels: 2, samplerate: 44100, format: FLOAT32LE
    All supported output stream configs:
      channels: 2, samplerate min: 44100 max: 44100, format: FLOAT32LE


  Device: "Line 1 (Live! Cam Virtual)"
  ============================================================

    Capture
    ------------------------------------------------------------

    Playback
    ------------------------------------------------------------
    Default output stream config:
      channels: 2, samplerate: 44100, format: FLOAT32LE
    All supported output stream configs:
      channels: 2, samplerate min: 44100 max: 44100, format: FLOAT32LE


  Device: "Realtek Digital Output (Realtek High Definition Audio)"
  ============================================================

    Capture
    ------------------------------------------------------------

    Playback
    ------------------------------------------------------------
    Default output stream config:
      channels: 6, samplerate: 48000, format: FLOAT32LE
    All supported output stream configs:
      channels: 6, samplerate min: 48000 max: 48000, format: FLOAT32LE


  Device: "CABLE Output (VB-Audio Virtual Cable)"
  ============================================================

    Capture
    ------------------------------------------------------------
    Default input stream config:
      channels: 2, samplerate: 44100, format: FLOAT32LE
    All supported input stream configs:
      channels: 2, samplerate min: 44100 max: 44100, format: FLOAT32LE

    Playback
    ------------------------------------------------------------


  Device: "Mic 1 (Live! Cam Virtual)"
  ============================================================

    Capture
    ------------------------------------------------------------
    Default input stream config:
      channels: 2, samplerate: 44100, format: FLOAT32LE
    All supported input stream configs:
      channels: 2, samplerate min: 44100 max: 44100, format: FLOAT32LE

    Playback
    ------------------------------------------------------------

camilladsp.exe -c test.conf -l debug -o camilla.log

Code:
TEST.CONF
devices:
  samplerate: 44100
  chunksize: 4096
  queuelimit: 4
  enable_rate_adjust: true
  adjust_period: 10.0
  silence_threshold: -80.0
  silence_timeout: 60.0
  target_level: 0

  capture:
    channels: 2
    device: "CABLE Output (VB-Audio Virtual Cable)"
    format: FLOAT32LE
    type: Wasapi

  playback:
    channels: 6
    device: "Realtek Digital Output (Realtek High Definition Audio)"
    format: FLOAT32LE
    type: Wasapi

pipeline:
  - type: Mixer
    description: "Expand to 6 channels"
    name: to6channels
    bypassed: false

mixers:
  to6channels:
    description: "Example mixer to convert two channels to six"
    channels:
      in: 2
      out: 6
    mapping:
      - dest: 0
        mute: false
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 1
        mute: false
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB
      - dest: 2
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 3
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB
      - dest: 4
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 5
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB

filters:
  fir_l_44:
    type: Conv
    parameters:
      type: Wav
      filename: 2_sept_730hz-44k.wav
      channel: 0
  fir_r_44:
    type: Conv
    parameters:
      type: Wav
      filename: 2_sept_730hz-44k.wav
      channel: 1


Code:
CAMILLA.LOG

2024-09-07 17:23:36.313076 INFO  [src/bin.rs:683] CamillaDSP version 2.0.3
2024-09-07 17:23:36.313076 INFO  [src/bin.rs:684] Running on windows, x86_64
2024-09-07 17:23:36.316076 DEBUG [src/bin.rs:728] Loaded state: None
2024-09-07 17:23:36.316076 DEBUG [src/bin.rs:738] Using default initial volume
2024-09-07 17:23:36.316076 DEBUG [src/bin.rs:755] Using default initial mute
2024-09-07 17:23:36.316076 DEBUG [src/bin.rs:765] Initial mute: [false, false, false, false, false]
2024-09-07 17:23:36.316076 DEBUG [src/bin.rs:766] Initial volume: [0.0, 0.0, 0.0, 0.0, 0.0]
2024-09-07 17:23:36.316076 DEBUG [src/bin.rs:768] Read config file Some("tesf.conf")
2024-09-07 17:23:36.317076 DEBUG [src\config.rs:1549] 2_sept_730hz-44k.wav is relative
2024-09-07 17:23:36.317076 DEBUG [src\config.rs:1553] Using 2_sept_730hz-44k.wav found relative to config file dir
2024-09-07 17:23:36.317076 DEBUG [src\config.rs:1549] 2_sept_730hz-44k.wav is relative
2024-09-07 17:23:36.317076 DEBUG [src\config.rs:1553] Using 2_sept_730hz-44k.wav found relative to config file dir
2024-09-07 17:23:36.317076 DEBUG [src/bin.rs:808] Config is valid
2024-09-07 17:23:36.317076 DEBUG [src/bin.rs:994] Wait for config
2024-09-07 17:23:36.317076 DEBUG [src/bin.rs:1010] Waiting to receive a command
2024-09-07 17:23:36.317076 DEBUG [src/bin.rs:1013] Config change command received
2024-09-07 17:23:36.317076 DEBUG [src/bin.rs:999] New config is available and there are no queued commands, continuing
2024-09-07 17:23:36.317076 DEBUG [src/bin.rs:1036] Config ready, start processing
2024-09-07 17:23:36.317076 DEBUG [src/bin.rs:157] Using channels [true, true]
2024-09-07 17:23:36.318076 DEBUG [src\filters.rs:488] Build new pipeline
2024-09-07 17:23:36.318076 DEBUG [src\processing.rs:19] build filters, waiting to start processing loop
2024-09-07 17:23:36.318076 DEBUG [src\wasapidevice.rs:924] Using a capture channel capacity of 33 buffers.
2024-09-07 17:23:36.318076 DEBUG [src\wasapidevice.rs:624] Using a playback channel capacity of 3 chunks.
2024-09-07 17:23:36.331077 DEBUG [src\wasapidevice.rs:213] Available capture devices: Ok(["CABLE Output (VB-Audio Virtual Cable)", "Mic 1 (Live! Cam Virtual)"])
2024-09-07 17:23:36.331077 DEBUG [src\wasapidevice.rs:142] Available playback devices: Ok(["CABLE Input (VB-Audio Virtual Cable)", "Line 1 (Live! Cam Virtual)", "Realtek Digital Output (Realtek High Definition Audio)"])
2024-09-07 17:23:36.333077 DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasapi-0.13.0\src\api.rs:366] The requested format is supported
2024-09-07 17:23:36.333077 DEBUG [src\wasapidevice.rs:238] Capture device supports format WaveFormat { nAvgBytesPerSec: 352800, cbSize: 22, nBlockAlign: 8, wBitsPerSample: 32, nSamplesPerSec: 44100, wFormatTag: 65534, wValidBitsPerSample: 32, SubFormat: 00000003-0000-0010-8000-00AA00389B71, nChannel: 2, dwChannelMask: 3 }
2024-09-07 17:23:36.333077 DEBUG [src\wasapidevice.rs:256] capture default period 100000, min period 30000
2024-09-07 17:23:36.339077 DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasapi-0.13.0\src\api.rs:371] The requested format is not supported but a simular one is
2024-09-07 17:23:36.339077 DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasapi-0.13.0\src\api.rs:375] got the nearest matching format as a WAVEFORMATEXTENSIBLE
2024-09-07 17:23:36.339077 ERROR [src/bin.rs:286] Playback error: Playback error: Playback device doesn't support format:
WaveFormat {
    nAvgBytesPerSec: 1058400,
    cbSize: 22,
    nBlockAlign: 24,
    wBitsPerSample: 32,
    nSamplesPerSec: 44100,
    wFormatTag: 65534,
    wValidBitsPerSample: 32,
    SubFormat: 00000003-0000-0010-8000-00AA00389B71,
    nChannel: 6,
    dwChannelMask: 63,
}
Closest match is:
WaveFormat {
    nAvgBytesPerSec: 1152000,
    cbSize: 22,
    nBlockAlign: 24,
    wBitsPerSample: 32,
    nSamplesPerSec: 48000,
    wFormatTag: 65534,
    wValidBitsPerSample: 32,
    SubFormat: 00000003-0000-0010-8000-00AA00389B71,
    nChannel: 6,
    dwChannelMask: 1551,
}
2024-09-07 17:23:36.339077 DEBUG [src/bin.rs:291] Error while starting, release barrier
2024-09-07 17:23:36.340077 DEBUG [src\wasapidevice.rs:267] initialized capture
2024-09-07 17:23:36.340077 DEBUG [src\wasapidevice.rs:271] Opened Wasapi capture device Some("CABLE Output (VB-Audio Virtual Cable)")
2024-09-07 17:23:36.340077 DEBUG [src\wasapidevice.rs:998] Capture device ready and waiting
2024-09-07 17:23:36.340077 DEBUG [src\wasapidevice.rs:1004] Capture device starts now!
2024-09-07 17:23:36.340077 DEBUG [src\wasapidevice.rs:1008] Exit message received, sending EndOfStream
2024-09-07 17:23:36.340077 DEBUG [src\wasapidevice.rs:1178] Wait for inner capture thread to exit
2024-09-07 17:23:36.340077 DEBUG [src/bin.rs:294] Wait for capture thread to exit..
2024-09-07 17:23:36.340077 DEBUG [src\processing.rs:21] Processing loop starts now!
2024-09-07 17:23:36.340077 INFO  [src\processing.rs:37] Playback thread has already stopped.
2024-09-07 17:23:36.340077 DEBUG [src\wasapidevice.rs:470] Capture thread raised priority, task index: 41
2024-09-07 17:23:36.340077 DEBUG [src\wasapidevice.rs:480] Stopping inner capture loop on request
2024-09-07 17:23:36.341077 DEBUG [src/bin.rs:1038] Processing ended with status Ok(Restart)
2024-09-07 17:23:36.341077 DEBUG [src/bin.rs:1052] Restarting with new config
2024-09-07 17:23:36.341077 DEBUG [src/bin.rs:994] Wait for config
2024-09-07 17:23:36.341077 DEBUG [src/bin.rs:1004] Wait mode is disabled, there are no queued commands, and no new config. Exiting.
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
108
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
There is a discussion on ASR about implementing CamillaDSP on an RPI. Since the OS on the Pi is essentially Linux, it would probably give you some ideas as to what to do.
Thanks. No way I'm gonna peruse a 106 page thread for a different OS but thanks for the link. I've noticed the author is active there so I re posted my problem on that forum after finding nothing even remotely close with the search feature.

 

phofman

Member
Joined
Jun 26, 2019
Posts
180
A few things:

* why not exclusive access? https://github.com/HEnquist/camilladsp/blob/master/backend_wasapi.md#exclusive-mode
* two different soundcards running asynchronously. Rate adjust is enabled, but no async resampler is configured
*
Code:
2024-09-07 17:23:36.339077 ERROR [src/bin.rs:286] Playback error: Playback error: Playback device doesn't support format:
WaveFormat {
    nAvgBytesPerSec: 1058400,
    cbSize: 22,
    nBlockAlign: 24,
    wBitsPerSample: 32,
    nSamplesPerSec: 44100,
    wFormatTag: 65534,
    wValidBitsPerSample: 32,
    SubFormat: 00000003-0000-0010-8000-00AA00389B71,
    nChannel: 6,
    dwChannelMask: 63,
}
Closest match is:
WaveFormat {
    nAvgBytesPerSec: 1152000,
    cbSize: 22,
    nBlockAlign: 24,
    wBitsPerSample: 32,
    nSamplesPerSec: 48000,
    wFormatTag: 65534,
    wValidBitsPerSample: 32,
    SubFormat: 00000003-0000-0010-8000-00AA00389B71,
    nChannel: 6,
    dwChannelMask: 1551,
}

Difference in sample rate and dwChannelMask. Samplerate diff is probably unimportant for the shared mode (which works similarly to the plug plugin in alsa).
 
Last edited:

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
108
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
Whatever works. SPDIF playback is currently set to exclusive access. Kodi likes it like that.
* two different soundcards running asynchronously. Rate adjust is enabled, but no async resampler is configured
*
Code:
2024-09-07 17:23:36.339077 ERROR [src/bin.rs:286] Playback error: Playback error: Playback device doesn't support format:
WaveFormat {
    nAvgBytesPerSec: 1058400,
    cbSize: 22,
    nBlockAlign: 24,
    wBitsPerSample: 32,
    nSamplesPerSec: 44100,
    wFormatTag: 65534,
    wValidBitsPerSample: 32,
    SubFormat: 00000003-0000-0010-8000-00AA00389B71,
    nChannel: 6,
    dwChannelMask: 63,
}
Closest match is:
WaveFormat {
    nAvgBytesPerSec: 1152000,
    cbSize: 22,
    nBlockAlign: 24,
    wBitsPerSample: 32,
    nSamplesPerSec: 48000,
    wFormatTag: 65534,
    wValidBitsPerSample: 32,
    SubFormat: 00000003-0000-0010-8000-00AA00389B71,
    nChannel: 6,
    dwChannelMask: 1551,
}

Difference in sample rate and dwChannelMask. Samplerate diff is probably unimportant for the shared mode (which works similarly to the plug plugin in alsa).

With a resampler defined it still does not start. Thanks for the hint though.
dwChannelMask: 63 would be ok for spdif, 1551 would be 9.1, not supported.

Code:
devices:
  samplerate: 44100
  chunksize: 2048
  queuelimit: 4
  enable_rate_adjust: true
  adjust_period: 10.0
  silence_threshold: -80.0
  silence_timeout: 60.0
  target_level: 0

  capture:
    channels: 2
    device: "CABLE Output (VB-Audio Virtual Cable)"
    format: FLOAT32LE
    type: Wasapi

  playback:
    channels: 6
    device: "Realtek Digital Output (Realtek High Definition Audio)"
    format: FLOAT32LE
    type: Wasapi

  resampler:
    type: AsyncSinc
    profile: VeryFast

pipeline:
  - type: Mixer
    description: "Expand to 6 channels"
    name: to6channels
    bypassed: false

mixers:
  stereo:
    description: "Example stereo mixer"
    channels:
      in: 2
      out: 2
    mapping:
      - dest: 0
        mute: false
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 1
        mute: false
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB

  mono:
    mapping:
      - dest: 0
        sources:
          - channel: 0
            gain: -6
          - gain: -6
            channel: 1
    channels:
      out: 1
      in: 2

  to6channels:
    description: "Example mixer to convert two channels to six"
    channels:
      in: 2
      out: 6
    mapping:
      - dest: 0
        mute: false
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 1
        mute: false
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB
      - dest: 2
        mute: true
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 3
        mute: true
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB
      - dest: 4
        mute: true
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 5
        mute: true
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB

filters:
  fir_l_44:
    type: Conv
    parameters:
      type: Wav
      filename: 2_sept_730hz-44k.wav
      channel: 0
  fir_r_44:
    type: Conv
    parameters:
      type: Wav
      filename: 2_sept_730hz-44k.wav
      channel: 1
 
Last edited:

phofman

Member
Joined
Jun 26, 2019
Posts
180
Whatever works. SPDIF playback is currently set to exclusive access. Kodi likes it like that.
The shared/excl mode is selected by the client (player/recorder). In windows settings you can only allow the excl. mode, or give it a priority respectively. CDSP needs to be told to use the exclusive mode in the config specifically https://github.com/HEnquist/camilladsp/blob/master/backend_wasapi.md#exclusive-mode

Search in Kodi sources suggests Kodi uses exclusive mode only, and fails if it cannot get access to exclusive.

With a resampler defined it still does not start.
Of course not, the resampler has no effect on the incompatible sample format error you experience. That issue would arise next, once you get your devices working.

Thanks for the hint though.
dwChannelMask: 63 would be ok for spdif, 1551 would be 9.1, not supported.
The supported channelMasks typically change in shared vs. excl. modes. Once you decide on your mode, we can see what can be done with the channelMasks (if anything needed). We co-ordinated the Rust wasapi-rs code with Henrik when I was developing the wasapi-excl plugin for REW (written also in Rust, using Henrik's WASAPI connector library), but so far CDSP does not use the added method is_supported_exclusive_with_quirks https://github.com/HEnquist/wasapi-...7b440dbbc02135357380fb612a10a9e659129a46bR345.
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
108
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
The shared/excl mode is selected by the client (player/recorder). In windows settings you can only allow the excl. mode, or give it a priority respectively. CDSP needs to be told to use the exclusive mode in the config specifically https://github.com/HEnquist/camilladsp/blob/master/backend_wasapi.md#exclusive-mode

Search in Kodi sources suggests Kodi uses exclusive mode only, and fails if it cannot get access to exclusive.


Of course not, the resampler has no effect on the incompatible sample format error you experience. That issue would arise next, once you get your devices working.


The supported channelMasks typically change in shared vs. excl. modes. Once you decide on your mode, we can see what can be done with the channelMasks (if anything needed). We co-ordinated the Rust wasapi-rs code with Henrik when I was developing the wasapi-excl plugin for REW (written also in Rust, using Henrik's WASAPI connector library), but so far CDSP does not use the added method is_supported_exclusive_with_quirks https://github.com/HEnquist/wasapi-...7b440dbbc02135357380fb612a10a9e659129a46bR345.
I tried every possible combination of loopback/virtual, shared/exclusive and every time a new error occurs. There are so many variables to setup in windows sound on top of that that it is impossible to get this to work. Wasted 2 more hours and a half on this today. And not advanced an inch. I'm wasting my time. I'm not looking to understand how it works, I've never been interested in Windows, what I need in fact is a valid/working config.
 

phofman

Member
Joined
Jun 26, 2019
Posts
180
Well, if you want complex setups, you have to learn how things work. The same for alsa + a51 last time, the same for this windows chain. The principles are the same no matter what OS - the source and sink formats must be compatible. And error/debug messages do tell a lot and are important to read and understand when hitting issues.
 

linuxonly

Member
Thread Starter
Joined
Jul 27, 2024
Posts
108
More  
Preamp, Processor or Receiver
Logitech Z906
DAC
AMD FCH Azalia
Computer Audio
SPDIF output with alsa, pipewire, wireplumber on Fedora 40
Streaming Equipment
Kodi
Front Height Speakers
33 in
Middle Height Speakers
30 in
Rear Height Speakers
57 in
Video Display Device
X11/VGA + X11/DVI
It's not a complex setup, in fact it's a quite straightforward one: Convolver for SPDIF on Win 7. Unfortunately not s single example over the whole net. And there is nothing to be learned when every single edit results in an error.

I got rid of the crappy `CABLE Output (VB-Audio Virtual Cable)` and replaced it with `Virtual Audio Cable` which supports multiple sample rates. It worked flawlessly. One thing to address: when Kodi switches to any 5.1 format, CDSP exits. Higher priority I guess. Therefore I have 2 configs to test. Both are OK for stereo material.


Code:
devices:
  samplerate: 48000
  chunksize: 2048
  queuelimit: 4
  enable_rate_adjust: true
  adjust_period: 10.0
  silence_threshold: -80.0
  silence_timeout: 60.0
  target_level: 0

  capture:
    channels: 2
    device: "Line 1 (Virtual Audio Cable)"
    format: FLOAT32LE
    type: Wasapi
    exclusive: false
    loopback: false

  playback:
    channels: 6
    device: "Realtek Digital Output (Realtek High Definition Audio)"
    format: FLOAT32LE
    type: Wasapi
    exclusive: false

  resampler:
    type: AsyncSinc
    profile: VeryFast

pipeline:
  - type: Mixer
    name: to6channels
    bypassed: false
  - type: Filter
    channel: 0
    names:
      - fir_l_48
  - type: Filter
    channel: 1
    names:
      - fir_r_48
    
mixers:
  stereo:
    description: "Example stereo mixer"
    channels:
      in: 2
      out: 2
    mapping:
      - dest: 0
        mute: false
        sources:
          - channel: 0
            gain: 20
            inverted: false
            scale: dB
      - dest: 1
        mute: false
        sources:
          - channel: 1
            gain: 20
            inverted: false
            scale: dB

  mono:
    mapping:
      - dest: 0
        sources:
          - channel: 0
            gain: 14
          - gain: 14
            channel: 1
    channels:
      out: 1
      in: 2

  to6channels:
    description: "Example mixer to convert two channels to six"
    channels:
      in: 2
      out: 6
    mapping:
      - dest: 0
        mute: false
        sources:
          - channel: 0
            gain: 20
            inverted: false
            scale: dB
      - dest: 1
        mute: false
        sources:
          - channel: 1
            gain: 20
            inverted: false
            scale: dB
      - dest: 2
        mute: true
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 3
        mute: true
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB
      - dest: 4
        mute: true
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 5
        mute: true
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB

filters:
  fir_l_48:
    type: Conv
    parameters:
      type: Wav
      filename: 2_sept_730hz-48k.wav
      channel: 0
  fir_r_48:
    type: Conv
    parameters:
      type: Wav
      filename: 2_sept_730hz-48k.wav
      channel: 1

Code:
devices:
  samplerate: 48000
  chunksize: 2048
  queuelimit: 4
  enable_rate_adjust: true
  adjust_period: 10.0
  silence_threshold: -80.0
  silence_timeout: 60.0
  target_level: 0

  capture:
    channels: 2
    device: "Line 1 (Virtual Audio Cable)"
    format: FLOAT32LE
    type: Wasapi
    exclusive: false
    loopback: false

  playback:
    channels: 2
    device: "Realtek Digital Output (Realtek High Definition Audio)"
    format: FLOAT32LE
    type: Wasapi
    exclusive: false

  resampler:
    type: AsyncSinc
    profile: VeryFast

pipeline:
  - type: Mixer
    name: stereo
    bypassed: false
  - type: Filter
    channel: 0
    names:
      - fir_l_48
  - type: Filter
    channel: 1
    names:
      - fir_r_48
    
mixers:
  stereo:
    description: "Example stereo mixer"
    channels:
      in: 2
      out: 2
    mapping:
      - dest: 0
        mute: false
        sources:
          - channel: 0
            gain: 20
            inverted: false
            scale: dB
      - dest: 1
        mute: false
        sources:
          - channel: 1
            gain: 20
            inverted: false
            scale: dB

  mono:
    mapping:
      - dest: 0
        sources:
          - channel: 0
            gain: 14
          - gain: 14
            channel: 1
    channels:
      out: 1
      in: 2

  to6channels:
    description: "Example mixer to convert two channels to six"
    channels:
      in: 2
      out: 6
    mapping:
      - dest: 0
        mute: false
        sources:
          - channel: 0
            gain: 20
            inverted: false
            scale: dB
      - dest: 1
        mute: false
        sources:
          - channel: 1
            gain: 20
            inverted: false
            scale: dB
      - dest: 2
        mute: true
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 3
        mute: true
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB
      - dest: 4
        mute: true
        sources:
          - channel: 0
            gain: 0
            inverted: false
            scale: dB
      - dest: 5
        mute: true
        sources:
          - channel: 1
            gain: 0
            inverted: false
            scale: dB

filters:
  fir_l_48:
    type: Conv
    parameters:
      type: Wav
      filename: 2_sept_730hz-48k.wav
      channel: 0
  fir_r_48:
    type: Conv
    parameters:
      type: Wav
      filename: 2_sept_730hz-48k.wav
      channel: 1

Code:
2024-09-10 12:23:52.081997 INFO  [src/bin.rs:683] CamillaDSP version 2.0.3
2024-09-10 12:23:52.081997 INFO  [src/bin.rs:684] Running on windows, x86_64
2024-09-10 12:23:52.082998 DEBUG [src/bin.rs:728] Loaded state: None
2024-09-10 12:23:52.082998 DEBUG [src/bin.rs:738] Using default initial volume
2024-09-10 12:23:52.082998 DEBUG [src/bin.rs:755] Using default initial mute
2024-09-10 12:23:52.082998 DEBUG [src/bin.rs:765] Initial mute: [false, false, false, false, false]
2024-09-10 12:23:52.082998 DEBUG [src/bin.rs:766] Initial volume: [0.0, 0.0, 0.0, 0.0, 0.0]
2024-09-10 12:23:52.082998 DEBUG [src/bin.rs:768] Read config file Some("stereo.conf")
2024-09-10 12:23:52.083998 DEBUG [src\config.rs:1549] 2_sept_730hz-48k.wav is relative
2024-09-10 12:23:52.083998 DEBUG [src\config.rs:1553] Using 2_sept_730hz-48k.wav found relative to config file dir
2024-09-10 12:23:52.083998 DEBUG [src\config.rs:1549] 2_sept_730hz-48k.wav is relative
2024-09-10 12:23:52.083998 DEBUG [src\config.rs:1553] Using 2_sept_730hz-48k.wav found relative to config file dir
2024-09-10 12:23:52.088998 DEBUG [src\filters.rs:178] Read raw data from: '\\?\E:\2_sept_730hz-48k.wav', format: FLOAT32LE, number of coeffs: 131072
2024-09-10 12:23:52.089998 DEBUG [src\filters.rs:337] Read wav file '\\?\E:\2_sept_730hz-48k.wav', format: FLOAT32LE, channel: 0 of 2, samplerate: 48000, length: 65536
2024-09-10 12:23:52.094499 DEBUG [src\filters.rs:178] Read raw data from: '\\?\E:\2_sept_730hz-48k.wav', format: FLOAT32LE, number of coeffs: 131072
2024-09-10 12:23:52.095499 DEBUG [src\filters.rs:337] Read wav file '\\?\E:\2_sept_730hz-48k.wav', format: FLOAT32LE, channel: 1 of 2, samplerate: 48000, length: 65536
2024-09-10 12:23:52.095499 DEBUG [src/bin.rs:808] Config is valid
2024-09-10 12:23:52.095499 DEBUG [src/bin.rs:994] Wait for config
2024-09-10 12:23:52.095499 DEBUG [src/bin.rs:1010] Waiting to receive a command
2024-09-10 12:23:52.095499 DEBUG [src/bin.rs:1013] Config change command received
2024-09-10 12:23:52.095499 DEBUG [src/bin.rs:999] New config is available and there are no queued commands, continuing
2024-09-10 12:23:52.095499 DEBUG [src/bin.rs:1036] Config ready, start processing
2024-09-10 12:23:52.095999 DEBUG [src/bin.rs:157] Using channels [true, true]
2024-09-10 12:23:52.095999 DEBUG [src\wasapidevice.rs:624] Using a playback channel capacity of 5 chunks.
2024-09-10 12:23:52.095999 DEBUG [src\filters.rs:488] Build new pipeline
2024-09-10 12:23:52.095999 DEBUG [src\filters.rs:364] Build filter group from config
2024-09-10 12:23:52.096499 DEBUG [src\audiodevice.rs:465] Creating asynchronous resampler with parameters: SincInterpolationParameters { sinc_len: 64, f_cutoff: 0.91563815, oversampling_factor: 1024, interpolation: Linear, window: Hann2 }
2024-09-10 12:23:52.101000 DEBUG [src\filters.rs:178] Read raw data from: '\\?\E:\2_sept_730hz-48k.wav', format: FLOAT32LE, number of coeffs: 131072
2024-09-10 12:23:52.101500 DEBUG [src\filters.rs:337] Read wav file '\\?\E:\2_sept_730hz-48k.wav', format: FLOAT32LE, channel: 0 of 2, samplerate: 48000, length: 65536
2024-09-10 12:23:52.104000 DEBUG [src\wasapidevice.rs:924] Using a capture channel capacity of 17 buffers.
2024-09-10 12:23:52.104500 DEBUG [src\fftconv.rs:50] Conv fir_l_44 is using 32 segments
2024-09-10 12:23:52.106501 DEBUG [src\filters.rs:364] Build filter group from config
2024-09-10 12:23:52.112001 DEBUG [src\filters.rs:178] Read raw data from: '\\?\E:\2_sept_730hz-48k.wav', format: FLOAT32LE, number of coeffs: 131072
2024-09-10 12:23:52.112501 DEBUG [src\filters.rs:337] Read wav file '\\?\E:\2_sept_730hz-48k.wav', format: FLOAT32LE, channel: 1 of 2, samplerate: 48000, length: 65536
2024-09-10 12:23:52.115002 DEBUG [src\fftconv.rs:50] Conv fir_r_44 is using 32 segments
2024-09-10 12:23:52.117002 DEBUG [src\processing.rs:19] build filters, waiting to start processing loop
2024-09-10 12:23:52.117002 DEBUG [src\wasapidevice.rs:213] Available capture devices: Ok(["Line 1 (Virtual Audio Cable)", "CABLE Output (VB-Audio Virtual Cable)", "Mic 1 (Live! Cam Virtual)"])
2024-09-10 12:23:52.118502 DEBUG [src\wasapidevice.rs:142] Available playback devices: Ok(["CABLE Input (VB-Audio Virtual Cable)", "Line 1 (Live! Cam Virtual)", "Line 1 (Virtual Audio Cable)", "Realtek Digital Output (Realtek High Definition Audio)"])
2024-09-10 12:23:52.120002 DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasapi-0.13.0\src\api.rs:366] The requested format is supported
2024-09-10 12:23:52.120002 DEBUG [src\wasapidevice.rs:238] Capture device supports format WaveFormat { nAvgBytesPerSec: 384000, cbSize: 22, nBlockAlign: 8, wBitsPerSample: 32, nSamplesPerSec: 48000, wFormatTag: 65534, wValidBitsPerSample: 32, SubFormat: 00000003-0000-0010-8000-00AA00389B71, nChannel: 2, dwChannelMask: 3 }
2024-09-10 12:23:52.120502 DEBUG [src\wasapidevice.rs:256] capture default period 100000, min period 30000
2024-09-10 12:23:52.130004 DEBUG [C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasapi-0.13.0\src\api.rs:366] The requested format is supported
2024-09-10 12:23:52.130004 DEBUG [src\wasapidevice.rs:156] Playback device supports format WaveFormat { nAvgBytesPerSec: 384000, cbSize: 22, nBlockAlign: 8, wBitsPerSample: 32, nSamplesPerSec: 48000, wFormatTag: 65534, wValidBitsPerSample: 32, SubFormat: 00000003-0000-0010-8000-00AA00389B71, nChannel: 2, dwChannelMask: 3 }
2024-09-10 12:23:52.130504 DEBUG [src\wasapidevice.rs:174] playback default period 100000, min period 30000
2024-09-10 12:23:52.158007 DEBUG [src\wasapidevice.rs:267] initialized capture
2024-09-10 12:23:52.158007 DEBUG [src\wasapidevice.rs:271] Opened Wasapi capture device Some("Line 1 (Virtual Audio Cable)")
2024-09-10 12:23:52.158007 DEBUG [src\wasapidevice.rs:998] Capture device ready and waiting
2024-09-10 12:23:52.158007 DEBUG [src/bin.rs:275] Capture thread ready to start
2024-09-10 12:23:52.158507 DEBUG [src\wasapidevice.rs:470] Capture thread raised priority, task index: 220
2024-09-10 12:23:52.175509 DEBUG [src\wasapidevice.rs:185] initialized capture
2024-09-10 12:23:52.176009 DEBUG [src\wasapidevice.rs:188] Opened Wasapi playback device Some("Realtek Digital Output (Realtek High Definition Audio)")
2024-09-10 12:23:52.176009 DEBUG [src/bin.rs:265] Playback thread ready to start
2024-09-10 12:23:52.176009 DEBUG [src/bin.rs:268] Both capture and playback ready, release barrier
2024-09-10 12:23:52.176009 DEBUG [src\wasapidevice.rs:708] Playback device ready and waiting
2024-09-10 12:23:52.176009 DEBUG [src\wasapidevice.rs:710] Playback device starts now!
2024-09-10 12:23:52.176009 DEBUG [src\wasapidevice.rs:1004] Capture device starts now!
2024-09-10 12:23:52.176009 DEBUG [src/bin.rs:270] Supervisor loop starts now!
2024-09-10 12:23:52.176009 DEBUG [src\processing.rs:21] Processing loop starts now!
2024-09-10 12:23:52.256020 DEBUG [src\wasapidevice.rs:323] Waited for data for 80 ms
2024-09-10 12:23:52.256020 DEBUG [src\wasapidevice.rs:331] Playback thread raised priority, task index: 222
2024-09-10 12:23:53.187638 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 47782.4 Hz

2024-09-10 12:25:12.240176 DEBUG [src\audiodevice.rs:689] Avg. buffer level: 1962.9, target level: 2048, corrected capture rate: 100.0090%, (+4.3Hz at 48000Hz)
2024-09-10 12:25:12.240176 DEBUG [src\wasapidevice.rs:751] Current buffer level 1962.9, set capture rate to 100.0090%
2024-09-10 12:25:12.240176 DEBUG [src/bin.rs:386] SetSpeed message received
2024-09-10 12:25:12.289683 DEBUG [src\wasapidevice.rs:1016] Requested to adjust capture speed to 1.0000895833333334
2024-09-10 12:25:12.289683 DEBUG [src\wasapidevice.rs:1018] Adjusting resampler rate to 1.0000895833333334
2024-09-10 12:25:13.098785 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 47616.4 Hz
2024-09-10 12:25:13.098785 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 47616.0 Hz
2024-09-10 12:25:14.118915 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 48178.9 Hz
2024-09-10 12:25:14.118915 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 48178.9 Hz
2024-09-10 12:25:15.139044 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 48179.1 Hz
2024-09-10 12:25:15.139044 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 48179.4 Hz
2024-09-10 12:25:16.168175 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 47754.9 Hz
2024-09-10 12:25:16.168175 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 47754.2 Hz
2024-09-10 12:25:17.188305 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 48180.0 Hz
2024-09-10 12:25:17.188305 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 48180.2 Hz
2024-09-10 12:25:18.217435 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 47762.0 Hz
2024-09-10 12:25:18.217435 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 47765.4 Hz
2024-09-10 12:25:19.237565 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 48173.5 Hz
2024-09-10 12:25:19.237565 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 48170.0 Hz
2024-09-10 12:25:20.257694 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 48177.4 Hz
2024-09-10 12:25:20.257694 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 48177.3 Hz
2024-09-10 12:25:21.286825 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 47757.2 Hz
2024-09-10 12:25:21.286825 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 47757.4 Hz
2024-09-10 12:25:22.269950 DEBUG [src\audiodevice.rs:689] Avg. buffer level: 1999.0, target level: 2048, corrected capture rate: 100.0052%, (+2.5Hz at 48000Hz)
2024-09-10 12:25:22.269950 DEBUG [src\wasapidevice.rs:751] Current buffer level 1999.0, set capture rate to 100.0052%
2024-09-10 12:25:22.270450 DEBUG [src/bin.rs:386] SetSpeed message received
2024-09-10 12:25:22.307455 DEBUG [src\wasapidevice.rs:1102] Measured sample rate is 48144.9 Hz
2024-09-10 12:25:22.307955 DEBUG [src\wasapidevice.rs:1119] Measured sample rate is 48144.6 Hz
2024-09-10 12:25:22.308955 DEBUG [src\wasapidevice.rs:1016] Requested to adjust capture speed to 1.0000520833333333
2024-09-10 12:25:22.308955 DEBUG [src\wasapidevice.rs:1018] Adjusting resampler rate to 1.0000520833333333
Clipboard01.jpg
 
Last edited:
Top Bottom