<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 25, 2013, at 2:50 AM, Paul B Mahol <<a href="mailto:onemda@gmail.com">onemda@gmail.com</a>> wrote:</div><blockquote type="cite"><blockquote type="cite"><br>Exactly, but you'd need to build the libav libs yourself, with debugging<br>info.<br><br>There's another thing that's nagging me. IIUC, the goal here is to convert a<br>buffer of (C) floats into signed shorts. I have some difficulty believing<br>that doing this through a generic workhouse function can be more efficient<br>than writing a simple loop and let a good optimising compiler create the<br>best assembly out of it ...<br></blockquote><br>Why not do it? And than compare speed. You will learn a lot.<br></blockquote></div><br><div>There's been several replies by a number of folks on various aspects of my problem, for which I thank you. There appears there may be either some misreads or something getting lost in translation. Rather than answer every post individually, I'm going to try to hit the high points in summary in one post here -- then I'll reply to a few individual ones as necessary. I hope this will communicate the most info while reducing list traffic. To the high points: </div><div><br></div><div>- It would appear from the replies of more than one person that the source code I posted was either missed or not received. I attached a text file with source code to my original message. I did that so as to minimize the length of the message dialog by not posting all code inline -- thought that would be considered proper etiquette on this list. I received this attachment from the mailing list fine, but perhaps some have mail servers which stripped this attachment off, here is a link to the file: </div><div><br></div><div><a href="https://www.dropbox.com/sh/3exqfeli6446wno/0w6IEyj7Jo/AudioProcessingSnippet.txt">https://www.dropbox.com/sh/3exqfeli6446wno/0w6IEyj7Jo/AudioProcessingSnippet.txt</a></div><div><br></div><div>I'm attaching the file as well, in case some have the URL above blocked for some reason.  </div><div><br></div><div>- Ideally yes, as anyone would be, I am interested in maximum performance. However, at this point, performance tweaking is a very distant secondary issue -- getting it working is by far most important issue on the table right now. </div><div><br></div><div>- It seemed from certain replies that there was a perception that either binaries built elsewhere were in play, or that I wasn't dealing with source. To erase those questions, I am developing on Mac OS X 10.8.2, using Xcode 4.5.2. I pulled FFmpeg source directly from git, and built all relevant libraries from source. </div><div><br></div><div>- My code has been modeled directly after the resampling_audio.c example bundled with FFmpeg. There were minor changes from the example for a) combining the resampler context allocation and setting of options into one call instead of two using swr_alloc_set_opts, and b) filling the source data array from QTSampleBuffer using the av_samples_fill_arrays. All of these changes execute successfully. The only error I receive results from the swr_convert call. </div><div><br></div><div>- Some of the responses seem to suggest that either a certain approach or resampling in general might be error prone, or known not to work in some cases or in some environments. If this is indeed the case, please expound further if you could, because at this point, I need to avoid beating my head endlessly against API that might be broken. I have assumed to this point that the API is solid and error-free, and all errors or omissions are in my code. If this is not the case, it would be good to know, and what the ramifications are. </div><div><br></div><div>After wrestling with this for days, at this point, anything helps. If answering any questions helps erase any ambiguity of what I'm doing or anything that might be contributing to the problem, I'm happy to do so. Again, thanks everyone for the conversation, I greatly appreciate the help. </div><div><br></div><div>Brad</div><div><br></div><div></div></body></html>