[prev in list] [next in list] [prev in thread] [next in thread]
List: sox-devel
Subject: [SoX-devel] [ sox-Bugs-3420893 ] Segmentation fault with compand <delay> and channels > 4
From: "SourceForge.net" <noreply () sourceforge ! net>
Date: 2011-10-09 22:39:18
Message-ID: E1RD21f-0002Lr-Vy () sfs-ml-2 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Bugs item #3420893, was opened at 2011-10-09 15:20
Message generated for change (Comment added) made by uklauer
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3420893&group_id=10706
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
> Status: Pending
> Resolution: Fixed
Priority: 5
Private: No
Submitted By: Marcus Blumhagen (optionator)
Assigned to: Nobody/Anonymous (nobody)
Summary: Segmentation fault with compand <delay> and channels > 4
Initial Comment:
When applying the compand effect, with the optional delay paramter set, to an audio \
stream with more than four channels, sox runs almost all the way to the end and then \
dumps the core. I have tried the latest git version (commit: \
2d3823c23c8d5f5dcb05abfc071ecc781e011b7b) and get the same error. Just try the \
example from the man page:
sox sample.sox sample-drc.wav [channels >4] compand 0.3,1 6:-70,-60,-20 -5 -90 0.2
Since I am trying to compress the dynamic range of a 6-channel DTS track and intend \
to do so more often in the future, I would greatly appreciate this bug being fixed. \
;) Please let me know, if I missed something or if any more information is necessary.
----------------------------------------------------------------------
> Comment By: Ulrich Klauer (uklauer)
Date: 2011-10-10 00:39
Message:
Yes, the line was 245, sorry for the mistake. I just pushed the fix to the
SF repository.
----------------------------------------------------------------------
Comment By: Marcus Blumhagen (optionator)
Date: 2011-10-09 19:08
Message:
Great, thank you very much for the quick fix. Actually, it was line 245, at
least that one seemed to be the right one. It works, yay! :)
But since I am not much of a programmer, here is how the function looks
now, just to double check:
238 static int drain(sox_effect_t * effp, sox_sample_t *obuf, size_t
*osamp)
239 {
240 priv_t * l = (priv_t *) effp->priv;
241 size_t chan, done = 0;
242
243 if (l->delay_buf_full == 0)
244 l->delay_buf_index = 0;
245 while (done+effp->out_signal.channels <= *osamp && l->delay_buf_cnt
> 0)
246 for (chan = 0; chan < effp->out_signal.channels; ++chan) {
247 int c = l->expectedChannels > 1 ? chan : 0;
248 double level_in_lin = l->channels[c].volume;
249 double level_out_lin = lsx_compandt(&l->transfer_fn,
level_in_lin);
250 obuf[done++] = l->delay_buf[l->delay_buf_index++] *
level_out_lin;
251 l->delay_buf_index %= l->delay_buf_size;
252 l->delay_buf_cnt--;
253 }
254 *osamp = done;
255 return l->delay_buf_cnt > 0 ? SOX_SUCCESS : SOX_EOF;
256 }
Thanks again!
----------------------------------------------------------------------
Comment By: Ulrich Klauer (uklauer)
Date: 2011-10-09 18:12
Message:
Found the bug: Change line 242 in src/compand.c to read
while (done+effp->out_signal.channels <= *osamp && l->delay_buf_cnt > 0)
I'll commit the fix later, first I'm investigating another problem in
mcompand.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3420893&group_id=10706
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic