Bitstream corruption when recording SPDIF?

Help for Audacity 2.x.x on Windows.

ImageThis forum is for Audacity 2.x.x on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.

Bitstream corruption when recording SPDIF?

Permanent link to this post Posted by usagi » Sun Jan 07, 2018 10:37 am

Windows 10, Audacity 2.1.3 (+self compiled ASIO support)

I'm trying to use Audacity to do capture of embedded AC3/DTS streams.

I'm using an ESI U24XL and capturing via TOSLINK. Applications see the bitstream as 48khz 2ch 16bit PCM.

It seems that during recording, values are being offset/corrupted. What should be 00 is sometimes being set to FF, what should be 7E is sometimes 7F, etc. Values look like randomly +/- 1.

Needless to say this ends up in corrupt, unplayable AC3/DTS streams :D I have tried WASAPI, ASIO, etc. and get the same results.

I tried another application - Reaper - and I get perfect captures with no errors.

It kinda seems like Audacity may be doing some kind of math or rounding on recording.
usagi
 
Posts: 2
Joined: Sun Jan 07, 2018 10:06 am
Operating System: Windows 10

Re: Bitstream corruption when recording SPDIF?

Permanent link to this post Posted by steve » Sun Jan 07, 2018 2:52 pm

I doubt that we are going to be able to offer much help.

Audacity interfaces with the computer sound system via PortAudio (http://www.portaudio.com/). Audacity handles audio data internally as 32-bit float. In most cases this means that there will be no rounding of data values that Audacity receives from PortAudio, though there would of course be rounding if Audacity received data in a very high bit format such as 32 or 64 bit integer.

I don't know what happens between PortAudio and the physical hardware. That's not really Audacity code, and I just look at it as a black box. I do know that I can feed a sample stream into Audacity and Audacity records the data bit-perfect, which indicates that there is no rounding on Audacity's side of the PortAudio API when recording as 32-bit float.

I don't know where to go with this from here as I don't have the hardware to even start debugging the problem. Unless you are able to probe what's happening inside PortAudio (debug the I/O library), then you may need to stick with Reaper for capture. If you want to use a smaller / lighter program for audio capture, you could try https://www.wavosaur.com/
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46541
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Bitstream corruption when recording SPDIF?

Permanent link to this post Posted by usagi » Sat Jan 13, 2018 2:51 am

interesting data points for anyone interested:

ffmpeg (directsound): bitstream corruption
OBS: bit perfect
usagi
 
Posts: 2
Joined: Sun Jan 07, 2018 10:06 am
Operating System: Windows 10


Return to Windows



Who is online

Users browsing this forum: akver123 and 11 guests