[ 
http://dev.sourcefabric.org/browse/LS-394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14043#action_14043
 ] 

David Baelde commented on LS-394:
---------------------------------

I agree that there is no problem with libsamplerate_converter; as the previous 
comment (by Romain in fact) says, the alloc in the name confused me.

Now, this ticket also mentionned a similar issue in Rutils.create_from_wav: in 
that function, our code assumes that resampling can only drop data, whereas a 
proper resampling would sometimes gives a little less, sometimes a little more. 
This is fishy: we should clarify whether there is an issue or not.

> Resampling should be stateful
> -----------------------------
>
>                 Key: LS-394
>                 URL: http://dev.sourcefabric.org/browse/LS-394
>             Project: Liquidsoap
>          Issue Type: Bug
>          Components: Liquidsoap
>            Reporter: David Baelde
>            Priority: Blocker
>             Fix For: 1.0
>
>
> A close look at our resampled audio probably shows some glitches, because we 
> create a new resampling object for each chunk:
> {{{
> Index: src/audio_converters/libsamplerate_converter.ml
> ===================================================================
> --- src/audio_converters/libsamplerate_converter.ml (revision 7444)
> +++ src/audio_converters/libsamplerate_converter.ml (working copy)
> @@ -56,6 +56,9 @@
>  let samplerate_converter () = 
>    let quality = quality_of_string quality_conf#get in
>    let converter = Samplerate.create quality 1 in
> +  (* TODO seems to me that this code neglects the fact that libsamplerate's
> +   * resampler has a state, missing the whole point of using a good 
> resampler *)
>    let convert ratio b ofs len =
>      Samplerate.process_alloc converter ratio b ofs len
>    in
> }}}
> There is also a similar problem in Rutils (see comment at the end of the 
> file).
> I'd suggest to change not only liquidsoap modules but also the ocaml-resample 
> API: libsamplerate has a type called state which became "type t" in OCaml... 
> that probably participated in the confusion.
> By the way, libsamplerate and ocaml-samplerate have a simpler stateless API 
> (http://www.mega-nerd.com/SRC/api.html), which we might as well use if we 
> don't want to deal with states.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Savonet-devl mailing list
Savonet-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-devl

Répondre à