Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to create buffer with 24 bit/96K sampling #11

Closed
cfmcmillan opened this issue Oct 16, 2018 · 14 comments
Closed

Fails to create buffer with 24 bit/96K sampling #11

cfmcmillan opened this issue Oct 16, 2018 · 14 comments

Comments

@cfmcmillan
Copy link

Using a GTX 1050 ti HDMI output for multi-channel audio output with Hauptwerk as the host. Buffering works correctly when sampling is set to 24 bit/48K. However, when it is set to 24 bit/96K, Hauptwerk generates the following error message:

"Could not create audio output buffers for ASIO driver 'ASIO:FlexASIO' with a buffer size of 1024 sample frames. Please try re-booting the computer. (Operating system message: ASE_HWMalfunction, code: -999)

Rebooting doesn't fix the problem, setting the sample rate back to 48K does.

@dechamps
Copy link
Owner

dechamps commented Oct 16, 2018

One thing that slipped my mind and that I should have led with during our email conversation: if you want a given sample rate to work, you need to make sure that it matches the sampling rate that Windows is using with your input and output devices, as configured in the Windows sound control panel. That's a limitation of WASAPI Shared, which doesn't support resampling.

From the README:

WASAPI (at least on my test system) seems to require that the sample rate used by the application matches the sample rate configured for the device (which is configurable in the Windows audio control panel). Corollary: if you use ASIO in both directions, your input device's sample rate need to match the output device's, else FlexASIO will not return any usable sample rates. In some ways this could be considered a feature since it guarantees that no unwanted sample rate conversions will take place.

So, in your case, you need to make sure your HDMI audio output is set to 96 kHz in the Windows audio settings (not just your application). With most host applications, you also need to make sure that your default input device is also set to 96 kHz, even if you're not using the input. Please confirm that is the case.

@cfmcmillan
Copy link
Author

cfmcmillan commented Oct 16, 2018 via email

@cfmcmillan
Copy link
Author

cfmcmillan commented Oct 16, 2018 via email

@dechamps
Copy link
Owner

dechamps commented Oct 16, 2018

Ok. Once #4 and #5 are done we can take a closer look as to why exactly FlexASIO is failing and what can be done about it.

@cfmcmillan
Copy link
Author

cfmcmillan commented Oct 17, 2018 via email

@dechamps
Copy link
Owner

@cfmcmillan: please try again with the new FlexASIO 0.3 release. If it still doesn't work, please gather logs as explained in the README and attach them here. I'm most interested in the logs when you attempt to use FlexASIO with a 96 kHz sample rate in your application, though it wouldn't hurt to attach FlexASIOTest logs as well.

@cfmcmillan
Copy link
Author

cfmcmillan commented Oct 25, 2018 via email

@dechamps
Copy link
Owner

@cfmcmillan: I'm afraid I didn't get your logfile. I don't think you can send files to Github by commenting via e-mail; you need to comment directly on the GitHub issue page and attach your logfile there.

@cfmcmillan
Copy link
Author

cfmcmillan commented Oct 26, 2018 via email

@dechamps
Copy link
Owner

dechamps commented Nov 1, 2018

@cfmcmillan: you should be able to work around your issue with FlexASIO 0.4 which I just released, as it allows you to choose which backend to use. I would expect the new default backend, DirectSound, to not have this issue.

In any case, if you're still having this problem with the WASAPI Shared backend, I am still interested in seeing a log, if only to determine if there is indeed a bug to be hunted down.

@cfmcmillan
Copy link
Author

Etienne -

Sorry for the long delay - here's the log file. With luck, this will come through.

FlexASIO.log

Charlie

@dechamps dechamps reopened this Nov 12, 2018
@dechamps
Copy link
Owner

dechamps commented Nov 12, 2018

Thanks. You were saying that you were having problems with the sample rate set to to 96 kHz. However, according to the log, your application is not even trying to use 96 kHz, it's trying to use 44.1 kHz :

2018-10-24T19:31:20.7767062-06:00 4312 6636 CFlexASIO::setSampleRate(44100)

That said, 96 kHz wouldn't work anyway, according to FlexASIOTest :

2018-10-24T19:18:49.7875132-06:00 4976 6120 CFlexASIO::canSampleRate(96000)
2018-10-24T19:18:49.7875654-06:00 4976 6120 CFlexASIO::OpenStream(96000, 0)
2018-10-24T19:18:49.7880569-06:00 4976 6120 [PortAudio] WASAPI ERROR HRESULT: 0x88890008 : AUDCLNT_E_UNSUPPORTED_FORMAT
 [FUNCTION: CreateAudioClient FILE: c:\users\edechamps\documents\portaudio\src\hostapi\wasapi\pa_win_wasapi.c {LINE: 2597}]
2018-10-24T19:18:49.7881061-06:00 4976 6120 [PortAudio] WASAPI ERROR PAERROR: -9997 : Invalid sample rate
 [FUNCTION: ActivateAudioClientInput FILE: c:\users\edechamps\documents\portaudio\src\hostapi\wasapi\pa_win_wasapi.c {LINE: 3037}]
2018-10-24T19:18:49.7881344-06:00 4976 6120 [PortAudio] WASAPI ERROR PAERROR: -9996 : Invalid device
 [FUNCTION: OpenStream FILE: c:\users\edechamps\documents\portaudio\src\hostapi\wasapi\pa_win_wasapi.c {LINE: 3226}]
2018-10-24T19:18:49.7881617-06:00 4976 6120 Cannot do this sample rate: Invalid device

That said, it looks like your application only cares about output, not input. Despite that, FlexASIO still tries to open an input, because of #24 (which should be fixed eventually). This is probably making your life harder because it requires the input device to have a matching sample rate. To avoid this, use FlexASIO 0.5a and the following configuration:

backend = "Windows WASAPI"

[input]
device = ""

This should make things easier because it will tell FlexASIO not to attempt to use an input at all, so that you only need to care about the settings of the output device. If you are still having issues with that configuration, please send another log.

@dechamps
Copy link
Owner

FlexASIO 1.0 which I just released includes some improvements in this area. Please try it and send an updated log if you still can't make it work.

@cfmcmillan
Copy link
Author

Etienne -

Unfortunately, I have changed my hardware and can no longer test in the configuration I was using before. Many thanks for your help in working to solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants