INTERACT FORUM

Please login or register.

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

Author Topic: How do I mix 2 zones's streams into one 64bit stream for WASAPI playback?  (Read 4517 times)

TrainWreck

  • Recent member
  • *
  • Posts: 7

Hello there,

I'm using JRiver MC 21 on Windows 10 x64 and am trying to mix 2 zones into one stereo stream for WASAPI playback.
What I'm trying achieve is the following (the whole point/difficulty is to how to achieve the mixing of both streams in 64bit mixer!, mixing in 64bit is much higher quality then mixing in 32/24bit in WASAPI NON-EXCLUSIVE-MODE/DIRECTSOUND):

[1st Zone music 64bit stream is playing, Dithering is off, equalizer is applied]
+
[2nd Zone GTA V IPC-THROUGH-WDM-DRIVER 24bit stream is playing and upconverted to 64bit by JRiver, Dithering is off, equalizer is applied]
=
[Both of the 64bit streams are being transferred to an external mixer like COCKOS REAPER without losing any of the 64bits of both streams]
---How do I do this???
||
||
\/
[The 64bit streams are mixed in the external mixer into one "summed" 64bit stream]
||
||
\/
[The mixer is converting the "summed" 64bit stream to 24bit with dithering applied]
||
||
\/
[The mixer is sending the converted&dithered 24bit "summed" 64bit stream to the soundcard's WASAPI]


-How can I achieve the whole process of the tree that I've described?

*If only JRiver MC21 would have an internal 64bit mixer....it would solve and decomplicate the whole 64bit mixing process (that I'm failing to achieve :().....I hope that MC22 will have an internal 64bit mixer :( :( :(
The principle philosophy of JRiver is to process (Equalize,Master,Edit) the sound in 64bit (for maximum fidelity and minimum distortion&noise) and then dither it to 24bit for the Digital-to-Analog conversion.
Taking out the mixing from the 64bit realm is going against the whole concept of the maximum fidelity 64bit processing of the sound in JRiver....
Also Linux isn't an alternative to Windows because the mixing engine is 32bit (without dithering to 24bit) at best.....
The solution would be a cross platform 64bit internal mixing engine in JRiver.


:(
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871

Well you would have to use WASAPI in non-exclusive mode.
This will not resample the audio, however it requires that the player does.
So the best option would be to have JRiver upsample everything to 96kHz.
Logged

TrainWreck

  • Recent member
  • *
  • Posts: 7

When I disable the exclusive mode in settings of WASAPI in windows then JRiver doesn't let me play the soundcard using wasapi at all...:(
ALSO:
The non exclusive WASAPI (in case it would work) would mix (I think) everything in 24bit and wouldn't change dynamically the sample rates according to Music zone's ever-changing sample rate.... I want to mix both zones's stereo streams into one stereo stream using 64 bit depth and using the Sample rate of the Music's Zone. I want the music zone's stream SQ to be effected the least the possible meaning no 24 bit mixing (ONLY 64bit) and no conversion of samplerate for the Music zone's stream.

Is it possible to downmix both of the zones's streams into one stereo stream using JRiver MC's 64bit audio engine?
*A music stream with non converted sample rate mixed in 64bit depth together with WDM's driver's IPC stream (which resides in a saparate zone) should result in the highest music zone's stream sound quality as far as destructive mixing goes...and thats were I'm aiming to
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871

When I disable the exclusive mode in settings of WASAPI in windows then JRiver doesn't let me play the soundcard using wasapi at all...
This is because the player must resample to match whatever rate is set in the Control Panel, as WASAPI does not automatically resample like DirectSound does.
If your device is set to 96kHz in the Control Panel, JRiver must resample everything to 96kHz or it won't play.

Is it possible to downmix both of the zones's streams into one stereo stream using JRiver MC's 64bit audio engine?
No, JRiver doesn't do mixing.
Logged

TrainWreck

  • Recent member
  • *
  • Posts: 7

Just succeeded playing both zones through WASAPI non exclusive and unfortunately:
A. The mixing is done @32bit and even worse- without dithering to 24bit
B. The sample rate as you (james) said isn't adaptable to the 1st zone's stream sample rate (must use sample rate conversion which is unacceptable for the 1st zone).

SO SAD :(

Anyway big thanks for the try.
If someone knows any magic/plugin/method/hack to mix two zones's streams in 64 bit with adaptable sample rate to the 1st zone stream then let me know. Windows's WASAPI's mixer is so limited at mixing.... :(
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871

Just succeeded playing both zones through WASAPI non exclusive and unfortunately:
A. The mixing is done @32bit and even worse- without dithering to 24bit
You should be able to set the output to 24-bit.

B. The sample rate as you (james) said isn't adaptable to the 1st zone's stream sample rate (must use sample rate conversion which is unacceptable for the 1st zone).
That's how it is for non-exclusive outputs.
You need an exclusive output to change the sample rate.

So you either have Windows handle the resampling (DirectSound) or the player handle resampling. (WASAPI)
Have you tried upsampling everything to the maximum that your device supports via JRiver? It shouldn't sound bad at all.
 
The resampling will be far less damaging than mixing in audio from another source.
Logged

TrainWreck

  • Recent member
  • *
  • Posts: 7

24/32bit depth mixing is unacceptable.... :(
Is there a way to mix both JRiver's zones's 64bit depth streams in an external mixer in 64bit depth (while the streams are being transferred to the mixer in 64bit depth)?
What I've tried so far and didn't transfer the whole 64bit streams to the external mixer:
-->Sending both streams using ASIO4ALL to COCKOS REAPER (a 64bit depth Audio Editor/Mixer/Recorder...) for realtime mixing and playback. But the streams are being send to Reaper in 32bit depth instead of 64bit.....
--> Sending both streams using Reaper's ASIO to COCKOS REAPER for realtime mixing and playback. But the streams are being send in 32bit depth instead of 64bit.....
--> Sending both streams to WASAPI NON-EXCLUSIVE for realtime mixing and playback. But the streams are being send&mixed in 32bit depth instead of 64bit.....
--> Sending both streams to DIRECTSOUND for realtime mixing and playback. But the streams are being send&mixed in 24bit depth instead of 64bit.....
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871

All internal processing is 64-bit.
The 24-bit output is what goes to your device.
 
I still can't understand what you're trying to achieve here though.
You want "bit-perfect" audio, but you also want to mix in system audio? The two concepts are incompatible.
 
What are you doing where 64-bit vs 32-bit makes a difference?
Logged

TrainWreck

  • Recent member
  • *
  • Posts: 7

All internal processing is 64-bit.
The 24-bit output is what goes to your device.
 
I still can't understand what you're trying to achieve here though.
You want "bit-perfect" audio, but you also want to mix in system audio? The two concepts are incompatible.
 
What are you doing where 64-bit vs 32-bit makes a difference?

What I'm trying achieve is the following (the whole point/difficulty is to how to achieve the mixing of both streams in 64bit mixer!, mixing in 64bit is much higher quality then mixing in 32/24bit in WASAPI NON-EXCLUSIVE-MODE/DIRECTSOUND):

[1st Zone music 64bit stream is playing, Dithering is off, equalizer is applied]
+
[2nd Zone GTA V IPC-THROUGH-WDM-DRIVER 24bit stream is playing and upconverted to 64bit by JRiver, Dithering is off, equalizer is applied]
=
[Both of the 64bit streams are being transferred to an external mixer like COCKOS REAPER without losing any of the 64bits of the streams]
---How do I do this???
||
||
\/
[The 64bit streams are mixed in the external mixer into one "summed" 64bit stream]
||
||
\/
[The mixer is converting the "summed" 64bit stream to 24bit with dithering applied]
||
||
\/
[The mixer is sending the converted&dithered 24bit "summed" 64bit stream to the soundcard's WASAPI]


*If only JRiver MC21 would have an internal 64bit mixer....it would solve and decomplicate the whole 64bit mixing process (that I'm failing to achieve :().....I hope that MC22 will have an internal 64bit mixer :( :( :(
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10943

I don't think any output API supports 64-bit output, the best you can do is 32-bit, which should be fine either way. 32-bit has such high dynamic range already that its rather unlikely to notice any difference to 64-bit.
There are no plans for such a feature at this time.
Logged
~ nevcairiel
~ Author of LAV Filters

TrainWreck

  • Recent member
  • *
  • Posts: 7

I don't think any output API supports 64-bit output, the best you can do is 32-bit, which should be fine either way. 32-bit has such high dynamic range already that its rather unlikely to notice any difference to 64-bit.
There are no plans for such a feature at this time.

The problem is that a proper dithered-all-the-way 32bit mixing isn't possible because:

[1st Zone music 64bit stream is playing, Dithering is off, equalizer is applied]
+
[2nd Zone GTA V IPC-THROUGH-WDM-DRIVER 24bit stream is playing and upconverted to 64bit by JRiver, Dithering is off, equalizer is applied]
=
[Both of the 64bit are converted to 32bit with dithering using a VST plugin, and are sent to WASAPI NON-EXCLUSIVE]
||
||
\/
[The 32bit streams are mixed in WASAPI NON-EXCLUSIVE into one "summed" 32bit stream]
||
||
\/
[WASAPI NON-EXCLUSIVE mixer is converting the "summed" 32bit stream to 24bit by TRUNCATING THE LAST 8 BITS WITHOUT ANY DITHERING]
||
||
\/
[The NON DITHERED 24BIT "summed" stream is played back by the DAC]



BUT--->I found a partial solution for 64bit mixing of the zones's streams which would work if there would be an option
to transfer 64bit stream from 1st Zone to 2nd Zone without losing any bits....:

I found that JRiver has a basic mixing capalities @DSP_STUDIO-->Parametric_Equalizer-->Mix_Channels-->ADD_(add_source_to_destination).
A possible usage of this mixing capability would be by
:

[1st Zone music 64bit stream is playing, Dithering is off, equalizer is applied,
The right and left channels are are being transferred to the Rear_right & Rear_Left accordingly by using
DSP_STUDIO-->Parametric_Equalizer-->Mix_Channels-->MOVE_(replace_destination_with_source_and_empty_source)]
+
[2nd Zone GTA V IPC-THROUGH-WDM-DRIVER 24bit stream is playing and upconverted to 64bit by JRiver, Dithering is off, equalizer is applied]
||
||
\/

[The 1st Zone's 64bit stream is being transferred to an to the 2nd zone @64bit without losing any of the bits]---THE REQUESTED FEATURE :(
||
||
\/
[In the the 2nd Zone the mixing is done by:
DSP_STUDIO-->Parametric_Equalizer-->Mix_Channels-->ADD_(add_source_to_destination)
While sources are: 1st Zone's 64bit stream Rear_right & Rear_Left
And Destinations are: 2nd Zone's 64bit stream Right & Left]
||
||
\/
[JRiver MC is converting the "summed" 64bit stream to 24bit with dithering applied]
||
||
\/
[JRiver MC is sending the converted&dithered 24bit "summed" stream to the soundcard's WASAPI, the soundcard channels mapping is set to play only Left&Right  Channels]



***The principle philosophy of JRiver is to process (Equalize,Master,Edit) the sound in 64bit (for maximum fidelity and minimum distortion&noise) and then dither it to 24bit for the Digital-to-Analog conversion.
Taking out the mixing from the 64bit realm is going against the whole concept of the maximum fidelity 64bit processing of the sound in JRiver....
Also Linux isn't an alternative to Windows because the mixing engine is 32bit (without dithering to 24bit) at best.....
The solution would be a cross platform 64bit internal mixing engine in JRiver (which half of it is already implanted by DSP_STUDIO-->Parametric_Equalizer-->Mix_Channels-->ADD_(add_source_to_destination)).
So I hope that sometimes in the future (preferably before the release of MC23) the 64bit internal mixing engine will be added to JRiver....
Logged
Pages: [1]   Go Up