[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sox-devel
Subject:    Re: [SoX-devel] Test whether PulseAudio is actually present (Debian bug #664301)
From:       robs <aquegg () yahoo ! co ! uk>
Date:       2012-05-07 15:15:35
Message-ID: 1336403735.14195.YahooMailNeo () web171205 ! mail ! ir2 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]







> ________________________________
> From: Pascal Giard <evilynux@gmail.com>
> I don't understand hat Rob meant by "more filling in". Rob, would you
> mind explaining?
> 
> No problem, in this code:
    sox_format_t format, * ft = &format;
    memset(ft, 0, sizeof(*ft));
    ft->filename = (char *)device_name(name);
    ft->priv = lsx_calloc(1, handler->priv_size);
    if (handler->startwrite(ft) == SOX_SUCCESS) {

the format general (format_t) and specific (priv) structures are being zero'd so the \
handlers must be able to open the device using default parameters (sampling rate, \
number of channels etc.).  If some don't then a fix could be needed in the handler or \
here to "fill in" some structure fields with non-zero values.

As I mentioned earlier to Pascal (but forgot to hit reply to all), I've committed \
this (but SourceForge's commit mail seemed to be broken) in the expectation that it \
will be tested before or during the next RC cycle.

Cheers,
Rob


> 


[Attachment #5 (text/html)]

<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, \
courier, monaco, monospace, sans-serif;font-size:10pt"><div style="font-family: \
'Courier New', courier, monaco, monospace, sans-serif; font-size: 10pt; \
"><span><br></span></div><div><br><blockquote style="font-family: 'Courier New', \
courier, monaco, monospace, sans-serif; font-size: 10pt; border-left-width: 2px; \
border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; \
margin-top: 5px; padding-left: 5px; ">  <div style="font-family: Courier New, \
courier, monaco, monospace, sans-serif; font-size: 10pt;" \
class="yui_3_2_0_20_133639113609061"> <div style="font-size: 12pt; font-family: \
'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" \
face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> \
Pascal Giard &lt;evilynux@gmail.com&gt;<br></font></div>I don't understand hat Rob \
meant by "more filling in".  Rob, would you<br>mind explaining?</div><div \
style="font-family: times new roman, new york, times, serif; font-size: 12pt;" \
class="yui_3_2_0_20_133639113609063"><br></div></div></blockquote><span><div><span><span \
style="font-family: 'times new roman', 'new york', times, serif;">No&nbsp;problem, in \
this code:</span></span></div><div><span style="font-family: 'times new roman', 'new \
york', times, serif;">&nbsp; &nbsp; sox_format_t format, * ft = \
&amp;format;</span></div><div><span style="font-family: 'times new roman', 'new \
york', times, serif;">&nbsp; &nbsp; memset(ft, 0, \
sizeof(*ft));</span></div><div><span style="font-family: 'times new roman', 'new \
york', times, serif;">&nbsp; &nbsp; ft-&gt;filename = (char \
*)device_name(name);</span></div><div><span style="font-family: 'times new roman', \
'new york', times, serif;">&nbsp; &nbsp; ft-&gt;priv = lsx_calloc(1, \
handler-&gt;priv_size);</span></div><div><span style="font-family: 'times new roman', \
'new  york', times, serif;">&nbsp; &nbsp; if (handler-&gt;startwrite(ft) == \
SOX_SUCCESS) {</span></div><div style="font-family: 'times new roman', 'new york', \
times, serif; "><br></div><div style="font-family: 'times new roman', 'new york', \
times, serif; ">the format general (format_t) and specific (priv) structures are \
being zero'd so the handlers must be able to open the device using default parameters \
(sampling rate, number of channels etc.). &nbsp;If some don't then a fix could be \
needed in the handler or here to "fill in" some structure fields with non-zero \
values.</div><div style="font-family: 'times new roman', 'new york', times, serif; \
"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; \
">As I mentioned earlier to Pascal (but forgot to hit reply to all), I've committed \
this (but SourceForge's commit mail seemed to be broken) in the expectation that it \
will be tested before or during the next RC cycle.</div><div  style="font-family: \
'times new roman', 'new york', times, serif; "><br></div><div style="font-family: \
'times new roman', 'new york', times, serif; ">Cheers,</div><div style="font-family: \
'times new roman', 'new york', times, serif; ">Rob</div><div style="font-family: \
'times new roman', 'new york', times, serif; "><br></div></span><blockquote \
style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; \
border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, \
255); margin-left: 5px; margin-top: 5px; padding-left: 5px; "><div \
style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; "><div \
style="font-family: 'times new roman', 'new york', times, serif; " \
class="yui_3_2_0_20_133639113609063"><br> </div> </div> </blockquote></div>   \
</div></body></html>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
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