copyright software licensing
Can I include sample code in my own program without breaching copyright rules?
<p>I made a program using NAudio (under Microsoft Public License) but including parts of the NAudio sample code. I want to distribute this program, probably as open source.</p>

<p>Is it legal if i distribute my program?</p>

<p>If so, do I have to do it under the MS-PL or can I use different licences (maybe putting the ms-pl code in a subfolder with a separate license.txt file)?</p>

<p>Can I insert my copyright notices in the program?</p>

<p>Yes, it is legal to distribute your program. It seems to say that you can use a licence that complies with NAudio's licence.</p>
<blockquote>
<ol start="3">
<li>Conditions and Limitations</li>
</ol>
<p>(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.</p>
<p>(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.</p>
<p>(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.</p>
<p>(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.</p>
<p>(E) The software is licensed &quot;as-is.&quot; You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.</p>
</blockquote>
<p>This is from <a href="https://github.com/naudio/NAudio/blob/master/license.txt" rel="nofollow noreferrer">https://github.com/naudio/NAudio/blob/master/license.txt</a></p>
