9 Feb 2012 15:36
Audio glitch with some audio content
Hello I am a developer of the mythtv projects (www.mythtv.org) ; and I'm responsible for the audio side of things. MythTV uses your libsamplerate to resample the audio to a sampling rate supported by the audio card hardware rather than letting the OS audio do its own resampling: this is to guarantee a higher level of audio quality. I've noticed that with 8kHz 8 bits audio (and yes, those still exist today!) , resampled to either 32kHz or 48kHz a glitch could be heard every once in a while like a loud "click". This phenomenon can be heard twice in the following sample: http://miffteevee.co.uk/filebin/audio_glitch.mov MythTV can be used to use 3 type of SRC converters: SRC_SINC_BEST_QUALITY = 0, SRC_SINC_MEDIUM_QUALITY = 1, SRC_SINC_FASTEST = 2, When using SRC_SINC_FASTEST, the glitch can't be heard With MEDIUM and BEST is can be heard, more often with MEDIUM... To be perfectly honest, I'm not 100% sure the problem isn't in mythtv and how it's working on block of data before feeding SRC, but provided I get a glitch free audio when disabling SRC or using SRC_SINC_FASTEST, it seems to me that the culprit is in libsamplerate(Continue reading)
> I noticed something that caught my attention however..
>
> From the documentation:
> > The input_frames_used and output_frames_gen fields are set by the
> > converter to inform the caller of the number of frames consumed from
> > the data_in array and the number of frames generated in the data_out
> > array respectively. These values are for the current call to
> > src_process only.
>
> is there a possibility, after a call to src_process that
> input_frames_used be different to input_frames?
Yes.
> and if so, does SRC
> buffers unused frame from a previous call to src_process to be used
> for another call later (end_of_input is set to 0 in my case)
Absolutely yes. In fact it must do so with all the SRC_SINC_* converters
because those are basically linear phase FIR filters which calculate
current output based on past *and* future input. Obviously it can't see
RSS Feed