Lee Revell <[EMAIL PROTECTED]> writes: > On Sat, 2005-12-10 at 22:52 +0100, David Kastrup wrote: >> I have a minidisc player with S/PDIF output and an ALSA supported >> soundcard (details if the card are not really important for the >> problem at hand). >> >> I sample recordings via >> >> arecord -D spdif -f cd >> >> Ok, and here is the rub: playback is not perfect, and neither seems to >> be the sampling. Probably at times error interpolation sets in, >> probably at times samples get lost or replicated. Not much, perhaps >> once per minute or so. This leads to audible clicks, of course. > > Well, it would be better to figure out why arecord doesn't work than try > to work around it. > > Use "arecord -v -D spdif -f cd" and see if a rate conversion plugin is > used. The ALSA SRC is not great so if that is the case then you'll get > better results sampling at 48KHz (-f dat) then downsampling to 44.1 > afterward.
Does not appear to be the case, and anyway, there would not be a reason that rate conversion leads to glitches. Here you are: Recording WAVE 'stdout' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Hardware PCM card 0 'C-Media PCI CMI8738-MC6' device 2 subdevice 0 Its setup is: stream : CAPTURE access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 16384 period_size : 4096 period_time : 92879 tick_time : 1000 tstamp_mode : NONE period_step : 1 sleep_min : 0 avail_min : 4096 xfer_align : 4096 start_threshold : 1 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 1073741824 Aborted by signal Interrupt... On another note: it would seem like a simple enough task to let the recording start with the first non-zero sample. I have been completely unable to make head or tails of the manual page descriptions of the arecord options presumably intended for that and have found absolutely no setting that would not either drop quite more than just the initial zeros, or not drop anything at all. I'd also like to prune trailing zeros at some point of time. arecord does not seem to have options for doing that, I guess. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum
