dechamps / FlexASIO

A flexible universal ASIO driver that uses the PortAudio sound I/O library. Supports WASAPI (shared and exclusive), KS, DirectSound and MME.
Other
1.35k stars 72 forks source link

Sampling errors on FLAC file #207

Closed vcfxb closed 9 months ago

vcfxb commented 9 months ago

I have a FLAC file I'm trying to use as part of some music I'm writing (via the Bitwig DAW v5.0.1) and for some reason every time I start the file playing, I get only about 1-2 seconds of audio and then it stops producing any sound. I have tried restarting the application, and then the computer, and now have just re-run it with logs.

The relevant part of the log file is here I believe, and the full log file is attached. I have not had this problem with any other FLAC files, and I have not had any issues playing this file in windows media player.

I am currently running Windows 11.

Full log file: FlexASIO.log

Lines like this repeat 7000 times from around line 1100 of the logs to the end.

2024-01-06T13:06:31.2810635-05:00 17436 11188 --- ENTERING STREAM CALLBACK
2024-01-06T13:06:31.2811870-05:00 17436 11188 Updated sample position: timestamp 1106913000000, 0 samples
2024-01-06T13:06:31.2812155-05:00 17436 11188 PortAudio stream callback with input 0000000005738DC0, output 0000000005738CE0, 882 frames, time info (PortAudio stream callback time info with input buffer ADC time 1107.15, current time 1107.18, output buffer DAC time 1107.18), flags 0
2024-01-06T13:06:31.2812635-05:00 17436 11188 Transferring output buffers from buffer index #1 to PortAudio
2024-01-06T13:06:31.2812844-05:00 17436 11188 --- EXITING STREAM CALLBACK (0 [paContinue])
2024-01-06T13:06:31.2962618-05:00 17436 11188 --- ENTERING STREAM CALLBACK
2024-01-06T13:06:31.2965932-05:00 17436 11188 Updated sample position: timestamp 1106928000000, 0 samples
2024-01-06T13:06:31.2966168-05:00 17436 11188 PortAudio stream callback with input 0000000005738DC0, output 0000000005738CE0, 882 frames, time info (PortAudio stream callback time info with input buffer ADC time 1107.15, current time 1107.19, output buffer DAC time 1107.19), flags 0
2024-01-06T13:06:31.2966541-05:00 17436 11188 Transferring input buffers from PortAudio to ASIO buffer index #0
2024-01-06T13:06:31.2966703-05:00 17436 11188 Firing ASIO bufferSwitchTimeInfo() callback with buffer index: 0, time info: (ASIO time with reserved 0 0 0 0, time info (ASIO time info with speed 0, system time 1106928000000, sample position 0, sample rate 44100 Hz, flags 7 [kSystemTimeValid, kSamplePositionValid, kSampleRateValid], reserved 0 0 0 0 0 0 0 0 0 0 0 0), time code (ASIO time code with speed 0, samples 0, flags 0, future 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
2024-01-06T13:06:31.2970292-05:00 17436 11188 --- ENTERING CONTEXT: outputReady()
2024-01-06T13:06:31.2970601-05:00 17436 11188 --- EXITING CONTEXT: outputReady() [OK]
2024-01-06T13:06:31.2970794-05:00 17436 11188 bufferSwitchTimeInfo() complete, returned time info: none
2024-01-06T13:06:31.2970943-05:00 17436 11188 Transferring output buffers from buffer index #0 to PortAudio
2024-01-06T13:06:31.2971092-05:00 17436 11188 --- EXITING STREAM CALLBACK (0 [paContinue])
2024-01-06T13:06:31.3117770-05:00 17436 11188 --- ENTERING STREAM CALLBACK
2024-01-06T13:06:31.3118533-05:00 17436 11188 Updated sample position: timestamp 1106943000000, 882 samples
2024-01-06T13:06:31.3118795-05:00 17436 11188 PortAudio stream callback with input 0000000005738DC0, output 0000000005738CE0, 882 frames, time info (PortAudio stream callback time info with input buffer ADC time 1107.17, current time 1107.21, output buffer DAC time 1107.21), flags 0
2024-01-06T13:06:31.3119220-05:00 17436 11188 Transferring input buffers from PortAudio to ASIO buffer index #1
2024-01-06T13:06:31.3119450-05:00 17436 11188 Firing ASIO bufferSwitchTimeInfo() callback with buffer index: 1, time info: (ASIO time with reserved 0 0 0 0, time info (ASIO time info with speed 0, system time 1106943000000, sample position 882, sample rate 44100 Hz, flags 7 [kSystemTimeValid, kSamplePositionValid, kSampleRateValid], reserved 0 0 0 0 0 0 0 0 0 0 0 0), time code (ASIO time code with speed 0, samples 0, flags 0, future 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
2024-01-06T13:06:31.3124306-05:00 17436 11188 --- ENTERING CONTEXT: outputReady()
2024-01-06T13:06:31.3124943-05:00 17436 11188 --- EXITING CONTEXT: outputReady() [OK]
2024-01-06T13:06:31.3125187-05:00 17436 11188 bufferSwitchTimeInfo() complete, returned time info: none
2024-01-06T13:06:31.3125354-05:00 17436 11188 Transferring output buffers from buffer index #1 to PortAudio
2024-01-06T13:06:31.3125529-05:00 17436 11188 --- EXITING STREAM CALLBACK (0 [paContinue])
2024-01-06T13:06:31.3271220-05:00 17436 11188 --- ENTERING STREAM CALLBACK
2024-01-06T13:06:31.3272064-05:00 17436 11188 Updated sample position: timestamp 1106959000000, 1764 samples
2024-01-06T13:06:31.3272309-05:00 17436 11188 PortAudio stream callback with input 0000000005738DC0, output 0000000005738CE0, 882 frames, time info (PortAudio stream callback time info with input buffer ADC time 1107.2, current time 1107.22, output buffer DAC time 1107.22), flags 0
2024-01-06T13:06:31.3272757-05:00 17436 11188 Transferring input buffers from PortAudio to ASIO buffer index #0
2024-01-06T13:06:31.3273004-05:00 17436 11188 Firing ASIO bufferSwitchTimeInfo() callback with buffer index: 0, time info: (ASIO time with reserved 0 0 0 0, time info (ASIO time info with speed 0, system time 1106959000000, sample position 1764, sample rate 44100 Hz, flags 7 [kSystemTimeValid, kSamplePositionValid, kSampleRateValid], reserved 0 0 0 0 0 0 0 0 0 0 0 0), time code (ASIO time code with speed 0, samples 0, flags 0, future 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
2024-01-06T13:06:31.3276167-05:00 17436 11188 --- ENTERING CONTEXT: outputReady()
2024-01-06T13:06:31.3276920-05:00 17436 11188 --- EXITING CONTEXT: outputReady() [OK]
dechamps commented 9 months ago

Your logfile ends in the middle of streaming. Is that because you copied the logfile while the application was still running? Or did the logfile just stopped growing (i.e. FlexASIO got completely stuck) and you had to kill the app?

In any case, it would be extremely surprising for FlexASIO to behave differently depending on the contents of the file your application is playing, unless there are differences between the files that make the application call FlexASIO differently (e.g. differences in channel counts, buffer sizes). In theory, nothing in FlexASIO or downstream of it should care what the actual audio data is - it's just copied around.

Can you check if the issue occurs with other ASIO drivers, such as ASIO4ALL?

You might also want to check if the issue occurs when running a different FlexASIO backend, such as MME or WASAPI.

vcfxb commented 9 months ago

I closed the program before copying/uploading the log file, so it should be accurate. Problem persists when using ASIO4ALL as well. Will attempt to switch to WASAPI or something later this afternoon when I have a chance.

dechamps commented 9 months ago

If the problem persists using ASIO4ALL then it is not a FlexASIO issue. It's more likely to be a bug in the application - you should report it to them.