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

Version 0.3a progress #16

Closed
josephernest opened this issue Oct 28, 2018 · 3 comments
Closed

Version 0.3a progress #16

josephernest opened this issue Oct 28, 2018 · 3 comments

Comments

@josephernest
Copy link

First of all, congratulations @dechamps for the update 0.3a which adds many things:

  • the installation issue on Windows 7 x64 is solved
  • the "erratic behaviour" issue for the playback position cursor (in SoundForge, see screencast video) is solved too! Now Flex works well with SoundForge.
  • logging, etc.

But now it's impossible to open FlexASIO with Ableton Live again.

image

Report:

C:\Program Files\FlexASIO\x64>FlexASIOTest_x64.exe
ASIOInit(asioVersion = 2)
-> 0 [ASE_OK]
asioVersion = 2 driverVersion = 2 name = FlexASIO errorMessage = No ASIO Driver
Error sysRef = 0000000000000000

ASIOGetChannels()
-> 0 [ASE_OK]
Channel count: 2 input, 2 output

ASIOGetBufferSize()
-> 0 [ASE_OK]
Buffer size: min 48 max 48000 preferred 1024 granularity 1

ASIOGetSampleRate()
-> 0 [ASE_OK]
Sample rate: 44100

ASIOCanSampleRate(44100)
-> 0 [ASE_OK]
ASIOSetSampleRate(44100)
-> 0 [ASE_OK]
ASIOGetSampleRate()
-> 0 [ASE_OK]
Sample rate: 44100
ASIOCanSampleRate(96000)
-> -995 [ASE_NoClock]
ASIOCanSampleRate(192000)
-> -995 [ASE_NoClock]
ASIOCanSampleRate(48000)
-> -995 [ASE_NoClock]

Log file:

2018-10-28T09:57:02.2087555+01:00 6132 5812 Logfile opened
2018-10-28T09:57:02.2087555+01:00 6132 5812 Log time source: GetSystemTimeAsFileTime
2018-10-28T09:57:02.2087555+01:00 6132 5812 Enabling PortAudio debug output redirection
2018-10-28T09:57:02.2087555+01:00 6132 5812 CFlexASIO::CFlexASIO()
2018-10-28T09:57:02.2097555+01:00 6132 5812 FlexASIO Release x64 0.3a built on 2018-10-27T23:16:46.2283106+01:00
2018-10-28T09:57:02.2097555+01:00 6132 5812 Host process: C:\ProgramData\Ableton\Live 10 Suite\Program\Ableton Live 10 Suite.exe
2018-10-28T09:57:02.2097555+01:00 6132 5812 PortAudio version: PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4
2018-10-28T09:57:02.2097555+01:00 6132 5812 CFlexASIO::init()
2018-10-28T09:57:02.2097555+01:00 6132 5812 Initializing PortAudio
2018-10-28T09:57:02.3717648+01:00 6132 5812 Selected host API #2 (Windows WASAPI)
2018-10-28T09:57:02.3727648+01:00 6132 5812 Getting input device info
2018-10-28T09:57:02.3727648+01:00 6132 5812 Selected input device: Microphone interne (Conexant 20672 SmartAudio HD)
2018-10-28T09:57:02.3727648+01:00 6132 5812 Getting output device info
2018-10-28T09:57:02.3727648+01:00 6132 5812 Selected output device: Speakers (Conexant 20672 SmartAudio HD)
2018-10-28T09:57:02.3727648+01:00 6132 5812 Initialized successfully
2018-10-28T09:57:02.3727648+01:00 6132 5812 CFlexASIO::getDriverName()
2018-10-28T09:57:02.3727648+01:00 6132 5812 CFlexASIO::getDriverVersion()
2018-10-28T09:57:02.3727648+01:00 6132 5812 CFlexASIO::getClockSources()
2018-10-28T09:57:02.3737649+01:00 6132 5812 CFlexASIO::setSampleRate(48000)
2018-10-28T09:57:02.3737649+01:00 6132 5812 CFlexASIO::getChannels()
2018-10-28T09:57:02.3737649+01:00 6132 5812 Returning 2 input channels and 2 output channels
2018-10-28T09:57:02.3737649+01:00 6132 5812 CFlexASIO::getBufferSize()
2018-10-28T09:57:02.3747650+01:00 6132 5812 Returning: min buffer size 48, max buffer size 48000, preferred buffer size 1024, granularity 1
2018-10-28T09:57:02.3747650+01:00 6132 5812 CFlexASIO::outputReady()
2018-10-28T09:57:02.3747650+01:00 6132 5812 CFlexASIO::createBuffers(4, 1024)
2018-10-28T09:57:02.3747650+01:00 6132 5812 Buffers instantiated, memory range : 000000001CADECB0-000000001CAE6CB0
2018-10-28T09:57:02.3747650+01:00 6132 5812 ASIO buffer #0 is input channel 0 - first half: 000000001CADECB0-000000001CADFCB0 - second half: 000000001CAE2CB0-000000001CAE3CB0
2018-10-28T09:57:02.3757650+01:00 6132 5812 ASIO buffer #1 is input channel 1 - first half: 000000001CADFCB0-000000001CAE0CB0 - second half: 000000001CAE3CB0-000000001CAE4CB0
2018-10-28T09:57:02.3757650+01:00 6132 5812 ASIO buffer #2 is output channel 0 - first half: 000000001CAE0CB0-000000001CAE1CB0 - second half: 000000001CAE4CB0-000000001CAE5CB0
2018-10-28T09:57:02.3757650+01:00 6132 5812 ASIO buffer #3 is output channel 1 - first half: 000000001CAE1CB0-000000001CAE2CB0 - second half: 000000001CAE5CB0-000000001CAE6CB0
2018-10-28T09:57:02.3757650+01:00 6132 5812 Opening PortAudio stream
2018-10-28T09:57:02.3757650+01:00 6132 5812 CFlexASIO::OpenStream(48000, 1024)
2018-10-28T09:57:02.4237678+01:00 6132 5812 Unable to open PortAudio stream: Invalid device
2018-10-28T09:57:02.4237678+01:00 6132 5812 CFlexASIO::getChannels()
2018-10-28T09:57:02.4237678+01:00 6132 5812 Returning 2 input channels and 2 output channels
2018-10-28T09:57:02.4247678+01:00 6132 5812 CFlexASIO::getBufferSize()
2018-10-28T09:57:02.4247678+01:00 6132 5812 Returning: min buffer size 48, max buffer size 48000, preferred buffer size 1024, granularity 1
2018-10-28T09:57:02.4247678+01:00 6132 5812 CFlexASIO::outputReady()
2018-10-28T09:57:02.4247678+01:00 6132 5812 CFlexASIO::createBuffers(4, 1024)
2018-10-28T09:57:02.4247678+01:00 6132 5812 Buffers instantiated, memory range : 000000001CADECB0-000000001CAE6CB0
2018-10-28T09:57:02.4257679+01:00 6132 5812 ASIO buffer #0 is input channel 0 - first half: 000000001CADECB0-000000001CADFCB0 - second half: 000000001CAE2CB0-000000001CAE3CB0
2018-10-28T09:57:02.4257679+01:00 6132 5812 ASIO buffer #1 is input channel 1 - first half: 000000001CADFCB0-000000001CAE0CB0 - second half: 000000001CAE3CB0-000000001CAE4CB0
2018-10-28T09:57:02.4257679+01:00 6132 5812 ASIO buffer #2 is output channel 0 - first half: 000000001CAE0CB0-000000001CAE1CB0 - second half: 000000001CAE4CB0-000000001CAE5CB0
2018-10-28T09:57:02.4257679+01:00 6132 5812 ASIO buffer #3 is output channel 1 - first half: 000000001CAE1CB0-000000001CAE2CB0 - second half: 000000001CAE5CB0-000000001CAE6CB0
2018-10-28T09:57:02.4257679+01:00 6132 5812 Opening PortAudio stream
2018-10-28T09:57:02.4257679+01:00 6132 5812 CFlexASIO::OpenStream(48000, 1024)
2018-10-28T09:57:02.4707705+01:00 6132 5812 Unable to open PortAudio stream: Invalid device
2018-10-28T09:57:02.4707705+01:00 6132 5812 CFlexASIO::disposeBuffers()
2018-10-28T09:57:02.4717705+01:00 6132 5812 disposeBuffers() called before createBuffers()
2018-10-28T09:57:02.4717705+01:00 6132 5812 CFlexASIO::~CFlexASIO()
2018-10-28T09:57:02.4717705+01:00 6132 5812 Closing PortAudio
2018-10-28T09:57:02.4717705+01:00 6132 5812 PortAudio closed successfully
2018-10-28T09:57:02.4717705+01:00 6132 5812 Disabling PortAudio debug output redirection
2018-10-28T09:57:18.0916639+01:00 6132 5812 Closing logfile

@josephernest
Copy link
Author

Solved! I forgot to set both the Windows playback devices and recording devices to 48Khz!

PS: is there a configuration file to set 44.1khz for Flex instead of 48khz? and a configuration file to set 512 or 256 latency instead of 1024 (without recompiling)?

@dechamps
Copy link
Owner

is there a configuration file to set 44.1khz for Flex instead of 48khz?

FlexASIO (more specifically, WASAPI Shared) uses the sample rate that your devices are set to. If you change both your input and output devices to 44.1 kHz, FlexASIO will use 44.1 kHz.

That said, from looking at your log I get the impression that it's Ableton that enforces the 48 kHz sample rate here; indeed, it never calls canSampleRate(), it just sets the sample rate to 48 kHz directly without asking FlexASIO which sample rates it supports. That can mean one of two things: either it's a setting you need to change in Ableton itself (not FlexASIO), or it tries to negotiate the sample rate with the ASIO driver in a more "subtle" way (e.g. it expects setSampleRate() calls to fail) which FlexASIO doesn't support.

If you really think it's FlexASIO's fault, then please open a separate issue that is specifically about sample rate negotiation between Ableton and FlexASIO, and I'll see if I can take a look. I could add a configuration knob to force FlexASIO into a specific sample rate, but I'd like to make sure that's really necessary first.

a configuration file to set 512 or 256 latency instead of 1024 (without recompiling)?

Again, this is something that the ASIO host application (here, Ableton) should be able to control. FlexASIO only "suggests" a preferred buffer size; the host application can decide to set it to something else. Ableton should allow you to change it somewhere in the settings. If it does not, then please file a separate issue to request a configuration knob for it.

@josephernest
Copy link
Author

josephernest commented Oct 28, 2018

That said, from looking at your log I get the impression that it's Ableton that enforces the 48 kHz sample rate here; indeed, it never calls canSampleRate(), it just sets the sample rate to 48 kHz directly without asking FlexASIO which sample rates it supports. That can mean one of two things: either it's a setting you need to change in Ableton itself (not FlexASIO), or it tries to negotiate the sample rate with the ASIO driver in a more "subtle" way (e.g. it expects setSampleRate() calls to fail) which FlexASIO doesn't support.

True, the previous setting in Ableton was 48 Khz (with the previously-used audio playback device):

image

that's why it was then trying to use 48Khz when opening Flex.

So this issue is not really a big issue: one just has to set the right sample rate before selecting Flex.

If you really think it's FlexASIO's fault, then please open a separate issue that is specifically about sample rate negotiation between Ableton and FlexASIO, and I'll see if I can take a look. I could add a configuration knob to force FlexASIO into a specific sample rate, but I'd like to make sure that's really necessary first.

Yes, in a future "release" version, this could be useful, because the end user should never see "Failed to open the device Flex", so a clever sample rate negotiation could be useful. But for now, I think it's a minor issue, because we know how to solve it (just set the right sample rate before changing the device to Flex in Ableton).

I created 2 issues as you suggested in your previous message, and I close this one here:

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