V5.20.10 Early Access

phofman

Registered
Joined
Jun 26, 2019
Messages
29
I don't know if this is supposed to work, but using a UMIK-1 and Windows, within a single REW session, I start with Java WASAPI and take measurements that look good, then switch to ASIO4ALL and take measurements that look good, and then switch back to Java WASAPI and get corrupted measurements. Switching back to ASIO4ALL again looks good.
Do you shutdown ASIO4All and make sure it's really not running before switching to WASAPI EXCL?
Should ASIO4All keep blocking the soundcard or somehow access it randomly, the card will not be available to WASAPI EXCL calls or may misbehave, who knows, it's a black box with no sources or reasonably accessible logs.
 

phofman

Registered
Joined
Jun 26, 2019
Messages
29
The HDMI EDID is constant, it doesn't vary with sound processing mode. The EDID advertises 16/20/24-bit at all HDMI-supported sampling rates, up to 8 channels. It's advertised in a single Short Audio Descriptor, which means it isn't even possible to express that 8-channel 44.1 kHz is not supported but 8-channel 48 kHz is. I can configure Windows for 7.1 24-bit 44.1 kHz output, and play a 7.1 32-bit 44.1 kHz WAV file, and have verified that the output coming from the PC is in fact 7.1 24-bit 44.1 kHz LPCM. I get the same error on a second PC, using a different HDMI driver/interface.

I would recommend to try FlexASIO for the same access and provide the logs which would show what format FlexASIO uses for the access (if it really makes it).
 

phofman

Registered
Joined
Jun 26, 2019
Messages
29
I'm simply switching drivers and devices from within REW Preferences, nothing more.
Then it's possible ASIO4All keeps the device busy or somehow blocked after REW stops using its ASIO side. Also does ASIO4All use exclusive mode? It likely uses standard windows mixer which may keep the device blocked for a while.

Did you enable exclusive mode taking priority for the device?

WASAPI Excl in REW talks straight to the device driver and if the device is busy (for whatever reason) and does not get fully released for REW access, the connector simply cannot proceed.

Should someone know of a method to check what process/software is currently using/blocking/limiting parameters of an audio device in windows, it would be very useful. I use linux where all this is easy to check.
 

thothsong

Member
Joined
Jun 29, 2021
Messages
173
I would recommend to try FlexASIO for the same access and provide the logs which would show what format FlexASIO uses for the access (if it really makes it).
FlexASIO is able to use 7.1 44.1 kHz. (The actual sound output is crackly, even with 48 kHz, but I've never used FlexASIO before, so not particularly interested in pursuing why.) Attached is a fragment of the log file.
 

Attachments

thothsong

Member
Joined
Jun 29, 2021
Messages
173
Also does ASIO4All use exclusive mode?
Yes.

Did you enable exclusive mode taking priority for the device?
Yes.

WASAPI Excl in REW talks straight to the device driver and if the device is busy (for whatever reason) and does not get fully released for REW access, the connector simply cannot proceed.
In which case I would have expected the measurement to fail completely, rather than yielding strange values.
 

phofman

Registered
Joined
Jun 26, 2019
Messages
29
FlexASIO is able to use 7.1 44.1 kHz. (The actual sound output is crackly, even with 48 kHz, but I've never used FlexASIO before, so not particularly interested in pursuing why.) Attached is a fragment of the log file.
Thanks, here the only difference in wasapi format params is the channel mask Portaudio uses. I will add portaudio masks to the list of channel masks the CleanSine wasapi-excl connector (used in REW) already checks.
 

sm52

Member
Joined
Mar 14, 2019
Messages
538
John, please fix this thing. In the measurement window and the generator window, you can set the sampling rate to 44.1 kHz. Accordingly, the measuring bandwidth is corrected automatically up to 22,050 Hz. But if after that you set the frequency to 48 kHz, then there is no automatic correction of the measurement bandwidth to 24 kHz. It remains at 22,050 Hz. Many do not pay attention to it. Only later, after taking a measurement and seeing that the end of the graph is at 48 kHz 22,050 Hz, do they begin to figure out what's the matter, why that is. I made files in the generator for writing to disk for measurements in the car. And I got back into this situation. I had to redo. In this thread https://www.avnirvana.com/threads/measuring-results-of-convolution-filters-in-roon-using-rew.10896/, in the screenshot, the sampling rate is 48 kHz, and the measurement bandwidth is 22,050 Hz. Because people think that when you change the sample rate, the measurement bandwidth should be corrected automatically.
 

ddude003

Senior Member
Joined
Aug 13, 2017
Messages
925
Location
Somewhere Northeast of Kansas City Missouri
My AV System  
Preamp, Processor or Receiver
PrimaLuna Dialogue Premium TubePre (2 channel+sub)
Main Amp
McIntosh MC152 SS Amp (2 channel)
Additional Amp
Yamaha RX-A850 Pro (the other 5 channels lol)
Computer Audio
MacBook Pro, Custom i7 7700k De-lid 2xAsus1080ti GFX build, Audirvana+, LiquidSonics, SoX
DAC
Chord Electronics Ltd. Qutest
Universal / Blu-ray / CD Player
Sony UBP-X700 /M Ultra HD 4K HDR
Front Speakers
Martin Logan ElectroMotion ESL
Center Channel Speaker
Martin Logan Motion C2
Surround Speakers
Martin Logan Motion 4
Surround Back Speakers
Martin Logan Motion 4 (yes, another set of these)
Subwoofers
Martin Logan Dynamo 700
Other Speakers or Equipment
Cifte 12AU7 NOS & Genalex Gold Lion Tubes in Pre
Video Display Device
Samsung The Premiere LSP7T UST Laser Projector
Screen
Elite Screens Aeon CLR3 0.8 Gain 103-inch
Remote Control
PrimaLuna & Lumin iApp
Streaming Equipment
Netgear Nighthawk S8000 Streaming Switch, Lumin U1 Mini Streamer/Transport
Streaming Subscriptions
Roon & QoBuz Studio Premier, Amazon Prime & Netflix
Other Equipment
ThrowRug, SaddleBlankets, WideBand & BaseTraps...
Nice catch @sm52... I had that set at 24,000 the other day... I assumed that all these settings were being saved when quitting, since there is a message saying so... Today when creating this example I did not even notice it was back to 22,050... The rest of my parameters from the other day were still there...
 
Last edited:

dcibel

Registered
Joined
Sep 10, 2017
Messages
21
The sample rate of the saved file and the start and end frequencies of your measurement are two completely different things, you should adjust them independently. Default start and end frequency is 100Hz and 10kHz from what I can tell, and sample rate of your soundcard when measuring is configured in the preferences window.
 

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
5,845
John, please fix this thing. In the measurement window and the generator window, you can set the sampling rate to 44.1 kHz. Accordingly, the measuring bandwidth is corrected automatically up to 22,050 Hz. But if after that you set the frequency to 48 kHz, then there is no automatic correction of the measurement bandwidth to 24 kHz. It remains at 22,050 Hz.
Will do.
 

John Mulcahy

REW Author
Thread Starter
Joined
Apr 3, 2017
Messages
5,845
The files linked in the first post have been updated with the following changes:
  • Extended the RTA clock rate monitoring to include FFT-locked sine signals
  • Show ASIO input and output formats separately
  • Doubled the scope buffer duration
  • If the sweep end is at Nyquist keep it at Nyquist when the sample rate changes
  • Added an export menu entry and Filter tasks action to save EQ filter settings as a formatted text file with a header and using the Export text delimiter to separate field
  • Added a button on the EQ filters panel to copy the filter settings to the clipboard in a text format that can be pasted into a spreadsheet
  • Bug fix: Use double precision calculations for the input high pass filter to avoid a rising noise floor at low frequencies for large signals
 

phofman

Registered
Joined
Jun 26, 2019
Messages
29
Also the wasapi-exclusive library now tries also the channel masks as in PortAudio = FlexAsio. Please test the HDMI multichannel which reportedly worked with FlexAsio exclusive mode. Thanks.
 

thothsong

Member
Joined
Jun 29, 2021
Messages
173
Also the wasapi-exclusive library now tries also the channel masks as in PortAudio = FlexAsio. Please test the HDMI multichannel which reportedly worked with FlexAsio exclusive mode. Thanks.
I still get the error with 44.1 and 88.2 kHz, on two Win10 PCs, one with ASIO4ALL installed, and one without. 48, 96, 176.4, and 192 kHz are fine.
 

phofman

Registered
Joined
Jun 26, 2019
Messages
29
I still get the error with 44.1 and 88.2 kHz, on two Win10 PCs, one with ASIO4ALL installed, and one without. 48, 96, 176.4, and 192 kHz are fine.
IIUC (no sources available) ASIO4ALL does not use WASAPI for the sound driver access. If you can make a software which uses wasapi exclusive output to your device at 44.1kHz multiples and provide logs which show what particular format https://docs.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible was used (like in that log from FlexASIO), I can add such format to the csjsound-wasapi library. Apart of that I am afraid I cannot do anything about this, sorry.
 

thothsong

Member
Joined
Jun 29, 2021
Messages
173
If you can make a software which uses wasapi exclusive output to your device at 44.1kHz multiples and provide logs which show what particular format https://docs.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible was used (like in that log from FlexASIO), I can add such format to the csjsound-wasapi library.
I hacked example code from someone else to do this, it uses IAudioClient directly with AUDCLNT_SHAREMODE_EXCLUSIVE, and it plays 44.1/88.2 7.1 audio as expected:

IAudioClient::Initialize succeeded
wFormatTag: 0xfffe nChannels: 8 nSamplesPerSec: 44100 nAvgBytesPerSec: 1411200 nBlockAlign: 32 wBitsPerSample: 32 cbSize: 22
wValidBitsPerSample: 24 dwChannelMask: 0x63F SubFormat: {00000001-0000-0010-8000-00AA00389B71}

IAudioClient::Initialize succeeded
wFormatTag: 0xfffe nChannels: 8 nSamplesPerSec: 88200 nAvgBytesPerSec: 2822400 nBlockAlign: 32 wBitsPerSample: 32 cbSize: 22
wValidBitsPerSample: 24 dwChannelMask: 0x63F SubFormat: {00000001-0000-0010-8000-00AA00389B71}
 

phofman

Registered
Joined
Jun 26, 2019
Messages
29
Excellent, that will help greatly.

Please enable debug in the REW csjsound library: put a new line with

-DcsjsoundLibLogLevel=debug

into REW_INSTALL_DIR/roomeqwizard.vmoptions file and send me the library log (should be in your home dir/REW/csjsound-lib.log) upon starting REW and trying to switch to 44.1kHz, on the very same machine/OS you run your test code.
 

thothsong

Member
Joined
Jun 29, 2021
Messages
173
send me the library log (should be in your home dir/REW/csjsound-lib.log) upon starting REW and trying to switch to 44.1kHz, on the very same machine/OS you run your test code.
Attached. 48kHz at startup, switched to 44.1, 88.2, then back to 48.
 

Attachments

thothsong

Member
Joined
Jun 29, 2021
Messages
173
Since the WASAPI problem seems to revolve around the channel mask, just to throw it out there, an alternative (more work, of course) would be to let the user specify the speaker setup in Preferences, and derive the channel count from that. That would remove the need for a stereo special case, while also allowing 3.1 and 5.1 configurations to be used when supported (which would be useful, from my perspective).
 
Top Bottom