Re: [ecasound] Bug: -i:resample and -y

From: Artur <arus@email-addr-hidden>
Date: Mon Mar 22 2010 - 14:35:38 EET

Hi.

The patch below fixes the bug, though I'm not sure whether it is done properly (on the other hand - it looks pretty ;)).

--- libecasound/audioio-resample.cpp.orig 2009-03-23 07:49:21.000000000 +0100
+++ libecasound/audioio-resample.cpp 2010-03-22 13:20:27.560851180 +0100
@@ -264,6 +264,7 @@
  
  SAMPLE_SPECS::sample_pos_t AUDIO_IO_RESAMPLE::seek_position(SAMPLE_SPECS::sample_pos_t pos)
  {
+ recalculate_psfactor();
    SAMPLE_SPECS::sample_pos_t pub_pos, child_pos =
      static_cast<long int>(std::floor(pos * (1.0f / psfactor_rep)));

Cheers.

--
Artur
Artur pisze:
> Hello.
>
> Specifying start position (option -y) when using object type 'resample' gives
> unexpected results. In the following case:
>
> ecasound -f:s16_le,1,96000 -i:resample,44100,file.wav -y:startpos -o:out.wav
>
> startpos must be specified as wanted_startpos*44100/96000. Otherwise if you
> specify -y:30, processing will start not 30, but 30*96000/44100=65 seconds
> from the beginning of file.wav.
> Ecasound version is 2.7.1. The same happens for resample-hq and resample-lq.
>
> Bye.
> --
> Artur
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Ecasound-list mailing list
> Ecasound-list@email-addr-hidden
> https://lists.sourceforge.net/lists/listinfo/ecasound-list
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Mon Mar 22 16:15:01 2010

This archive was generated by hypermail 2.1.8 : Mon Mar 22 2010 - 16:15:01 EET