The "GR-PEACH_Audio_Playback_Sample" is a sample code that can provides high-resolution audio playback of FLAC format files. It also allows the user to audio-playback control functions such as play, pause, and stop by manipulating key switches.

Dependencies:   R_BSP TLV320_RBSP USBHost_custom

Note

For a sample program of with LCD Board,
please refer to GR-PEACH_Audio_Playback_7InchLCD_Sample.

Introduction

The "GR-PEACH_Audio_Playback_Sample" is a sample code that can provides high-resolution audio playback of FLAC format files. It also allows the user to audio-playback control functions such as play, pause, and stop by manipulating key switches.

1. Overview of the Sample Code

1.1 Software Block Diagram

Figure 1.1 shows the software block diagram.

/media/uploads/dkato/audioplayback_figure1_1x.png

1.2 Pin Definitions

Table 1.1 shows the pins that this sample code are to use.

/media/uploads/dkato/audioplayback_table1_1.png

2. Sample Code Operating Environment

This sample code runs in GR-PEACH + the Audio/Camera shield for the GR-PEACH environment. This section explains the functions of the ports that are used by this sample code.

2.1 Operating Environment

Figure 2.1 shows the configuration of the operating environment for running this sample code.

/media/uploads/dkato/audioplayback_figure2_1.png /media/uploads/1050186/figure2_2.png /media/uploads/dkato/audioplayback_figure2_3.png

2.2 List of User Operations

A list of user operations on the command line, TFT touch keys, and switch key that the user can perform for this sample code is shown in. Table 2.1.

/media/uploads/dkato/audioplayback_table2_1x.png

3. Function Outline

The functions of this sample code are summarized in Table 3.1 to Table 3.3.

/media/uploads/dkato/audioplayback_table3_1.png /media/uploads/dkato/audioplayback_table3_2.png /media/uploads/dkato/audioplayback_table3_3.png /media/uploads/dkato/audioplayback_figure3_1.png

3.1 Playback Control

The playback control that the sample code supports include play, pause, stop, skip to next, and skip to previous.

3.2 Trick Play Control

Manipulating "Repeat" alternates between "Repeat mode On" and "Repeat mode Off". The default mode is "Repeat mode On". When the repeat mode is on, the playback of the first song starts after the playback of the last song is finished. When the repeat mode is off, the sample code enters the stopped state after the playback of the last song is finished.

3.3 Acquisition of the Song Information

The information of the song being played is obtained by operating the "Play info" during the playback of the song. Table 3.4 lists the items of information that can be obtained by the "Play info" operation.

/media/uploads/dkato/audioplayback_table3_4.png

3.4 How the Folder Structure is Analyzed

The sample coded analyzes the folder structure in the breadth-first search order. The order in which files are numbered is illustrated in Table 3.5. The sample code does not sort the files by file or folder name.

/media/uploads/dkato/audioplayback_table3_5.png

4.Others

The default setting of serial communication (baud rate etc.) in mbed is shown the following link.
Please refer to the link and change the settings of your PC terminal software.
The default value of baud rate in mbed is 9600, and this application uses baud rate 9600.
https://developer.mbed.org/teams/Renesas/wiki/GR-PEACH-Getting-Started#install-the-usb-serial-communication

Committer:
Osamu Nakamura
Date:
Fri Mar 31 14:00:23 2017 +0900
Revision:
6:df19c3e787ca
Parent:
0:ee40da884cfc
Introduced mbedOS 5 instead of mbedOS 2 (classic)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dkato 0:ee40da884cfc 1 GNU GENERAL PUBLIC LICENSE
dkato 0:ee40da884cfc 2 Version 2, June 1991
dkato 0:ee40da884cfc 3
dkato 0:ee40da884cfc 4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
dkato 0:ee40da884cfc 5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
dkato 0:ee40da884cfc 6 Everyone is permitted to copy and distribute verbatim copies
dkato 0:ee40da884cfc 7 of this license document, but changing it is not allowed.
dkato 0:ee40da884cfc 8
dkato 0:ee40da884cfc 9 Preamble
dkato 0:ee40da884cfc 10
dkato 0:ee40da884cfc 11 The licenses for most software are designed to take away your
dkato 0:ee40da884cfc 12 freedom to share and change it. By contrast, the GNU General Public
dkato 0:ee40da884cfc 13 License is intended to guarantee your freedom to share and change free
dkato 0:ee40da884cfc 14 software--to make sure the software is free for all its users. This
dkato 0:ee40da884cfc 15 General Public License applies to most of the Free Software
dkato 0:ee40da884cfc 16 Foundation's software and to any other program whose authors commit to
dkato 0:ee40da884cfc 17 using it. (Some other Free Software Foundation software is covered by
dkato 0:ee40da884cfc 18 the GNU Lesser General Public License instead.) You can apply it to
dkato 0:ee40da884cfc 19 your programs, too.
dkato 0:ee40da884cfc 20
dkato 0:ee40da884cfc 21 When we speak of free software, we are referring to freedom, not
dkato 0:ee40da884cfc 22 price. Our General Public Licenses are designed to make sure that you
dkato 0:ee40da884cfc 23 have the freedom to distribute copies of free software (and charge for
dkato 0:ee40da884cfc 24 this service if you wish), that you receive source code or can get it
dkato 0:ee40da884cfc 25 if you want it, that you can change the software or use pieces of it
dkato 0:ee40da884cfc 26 in new free programs; and that you know you can do these things.
dkato 0:ee40da884cfc 27
dkato 0:ee40da884cfc 28 To protect your rights, we need to make restrictions that forbid
dkato 0:ee40da884cfc 29 anyone to deny you these rights or to ask you to surrender the rights.
dkato 0:ee40da884cfc 30 These restrictions translate to certain responsibilities for you if you
dkato 0:ee40da884cfc 31 distribute copies of the software, or if you modify it.
dkato 0:ee40da884cfc 32
dkato 0:ee40da884cfc 33 For example, if you distribute copies of such a program, whether
dkato 0:ee40da884cfc 34 gratis or for a fee, you must give the recipients all the rights that
dkato 0:ee40da884cfc 35 you have. You must make sure that they, too, receive or can get the
dkato 0:ee40da884cfc 36 source code. And you must show them these terms so they know their
dkato 0:ee40da884cfc 37 rights.
dkato 0:ee40da884cfc 38
dkato 0:ee40da884cfc 39 We protect your rights with two steps: (1) copyright the software, and
dkato 0:ee40da884cfc 40 (2) offer you this license which gives you legal permission to copy,
dkato 0:ee40da884cfc 41 distribute and/or modify the software.
dkato 0:ee40da884cfc 42
dkato 0:ee40da884cfc 43 Also, for each author's protection and ours, we want to make certain
dkato 0:ee40da884cfc 44 that everyone understands that there is no warranty for this free
dkato 0:ee40da884cfc 45 software. If the software is modified by someone else and passed on, we
dkato 0:ee40da884cfc 46 want its recipients to know that what they have is not the original, so
dkato 0:ee40da884cfc 47 that any problems introduced by others will not reflect on the original
dkato 0:ee40da884cfc 48 authors' reputations.
dkato 0:ee40da884cfc 49
dkato 0:ee40da884cfc 50 Finally, any free program is threatened constantly by software
dkato 0:ee40da884cfc 51 patents. We wish to avoid the danger that redistributors of a free
dkato 0:ee40da884cfc 52 program will individually obtain patent licenses, in effect making the
dkato 0:ee40da884cfc 53 program proprietary. To prevent this, we have made it clear that any
dkato 0:ee40da884cfc 54 patent must be licensed for everyone's free use or not licensed at all.
dkato 0:ee40da884cfc 55
dkato 0:ee40da884cfc 56 The precise terms and conditions for copying, distribution and
dkato 0:ee40da884cfc 57 modification follow.
dkato 0:ee40da884cfc 58
dkato 0:ee40da884cfc 59 GNU GENERAL PUBLIC LICENSE
dkato 0:ee40da884cfc 60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
dkato 0:ee40da884cfc 61
dkato 0:ee40da884cfc 62 0. This License applies to any program or other work which contains
dkato 0:ee40da884cfc 63 a notice placed by the copyright holder saying it may be distributed
dkato 0:ee40da884cfc 64 under the terms of this General Public License. The "Program", below,
dkato 0:ee40da884cfc 65 refers to any such program or work, and a "work based on the Program"
dkato 0:ee40da884cfc 66 means either the Program or any derivative work under copyright law:
dkato 0:ee40da884cfc 67 that is to say, a work containing the Program or a portion of it,
dkato 0:ee40da884cfc 68 either verbatim or with modifications and/or translated into another
dkato 0:ee40da884cfc 69 language. (Hereinafter, translation is included without limitation in
dkato 0:ee40da884cfc 70 the term "modification".) Each licensee is addressed as "you".
dkato 0:ee40da884cfc 71
dkato 0:ee40da884cfc 72 Activities other than copying, distribution and modification are not
dkato 0:ee40da884cfc 73 covered by this License; they are outside its scope. The act of
dkato 0:ee40da884cfc 74 running the Program is not restricted, and the output from the Program
dkato 0:ee40da884cfc 75 is covered only if its contents constitute a work based on the
dkato 0:ee40da884cfc 76 Program (independent of having been made by running the Program).
dkato 0:ee40da884cfc 77 Whether that is true depends on what the Program does.
dkato 0:ee40da884cfc 78
dkato 0:ee40da884cfc 79 1. You may copy and distribute verbatim copies of the Program's
dkato 0:ee40da884cfc 80 source code as you receive it, in any medium, provided that you
dkato 0:ee40da884cfc 81 conspicuously and appropriately publish on each copy an appropriate
dkato 0:ee40da884cfc 82 copyright notice and disclaimer of warranty; keep intact all the
dkato 0:ee40da884cfc 83 notices that refer to this License and to the absence of any warranty;
dkato 0:ee40da884cfc 84 and give any other recipients of the Program a copy of this License
dkato 0:ee40da884cfc 85 along with the Program.
dkato 0:ee40da884cfc 86
dkato 0:ee40da884cfc 87 You may charge a fee for the physical act of transferring a copy, and
dkato 0:ee40da884cfc 88 you may at your option offer warranty protection in exchange for a fee.
dkato 0:ee40da884cfc 89
dkato 0:ee40da884cfc 90 2. You may modify your copy or copies of the Program or any portion
dkato 0:ee40da884cfc 91 of it, thus forming a work based on the Program, and copy and
dkato 0:ee40da884cfc 92 distribute such modifications or work under the terms of Section 1
dkato 0:ee40da884cfc 93 above, provided that you also meet all of these conditions:
dkato 0:ee40da884cfc 94
dkato 0:ee40da884cfc 95 a) You must cause the modified files to carry prominent notices
dkato 0:ee40da884cfc 96 stating that you changed the files and the date of any change.
dkato 0:ee40da884cfc 97
dkato 0:ee40da884cfc 98 b) You must cause any work that you distribute or publish, that in
dkato 0:ee40da884cfc 99 whole or in part contains or is derived from the Program or any
dkato 0:ee40da884cfc 100 part thereof, to be licensed as a whole at no charge to all third
dkato 0:ee40da884cfc 101 parties under the terms of this License.
dkato 0:ee40da884cfc 102
dkato 0:ee40da884cfc 103 c) If the modified program normally reads commands interactively
dkato 0:ee40da884cfc 104 when run, you must cause it, when started running for such
dkato 0:ee40da884cfc 105 interactive use in the most ordinary way, to print or display an
dkato 0:ee40da884cfc 106 announcement including an appropriate copyright notice and a
dkato 0:ee40da884cfc 107 notice that there is no warranty (or else, saying that you provide
dkato 0:ee40da884cfc 108 a warranty) and that users may redistribute the program under
dkato 0:ee40da884cfc 109 these conditions, and telling the user how to view a copy of this
dkato 0:ee40da884cfc 110 License. (Exception: if the Program itself is interactive but
dkato 0:ee40da884cfc 111 does not normally print such an announcement, your work based on
dkato 0:ee40da884cfc 112 the Program is not required to print an announcement.)
dkato 0:ee40da884cfc 113
dkato 0:ee40da884cfc 114 These requirements apply to the modified work as a whole. If
dkato 0:ee40da884cfc 115 identifiable sections of that work are not derived from the Program,
dkato 0:ee40da884cfc 116 and can be reasonably considered independent and separate works in
dkato 0:ee40da884cfc 117 themselves, then this License, and its terms, do not apply to those
dkato 0:ee40da884cfc 118 sections when you distribute them as separate works. But when you
dkato 0:ee40da884cfc 119 distribute the same sections as part of a whole which is a work based
dkato 0:ee40da884cfc 120 on the Program, the distribution of the whole must be on the terms of
dkato 0:ee40da884cfc 121 this License, whose permissions for other licensees extend to the
dkato 0:ee40da884cfc 122 entire whole, and thus to each and every part regardless of who wrote it.
dkato 0:ee40da884cfc 123
dkato 0:ee40da884cfc 124 Thus, it is not the intent of this section to claim rights or contest
dkato 0:ee40da884cfc 125 your rights to work written entirely by you; rather, the intent is to
dkato 0:ee40da884cfc 126 exercise the right to control the distribution of derivative or
dkato 0:ee40da884cfc 127 collective works based on the Program.
dkato 0:ee40da884cfc 128
dkato 0:ee40da884cfc 129 In addition, mere aggregation of another work not based on the Program
dkato 0:ee40da884cfc 130 with the Program (or with a work based on the Program) on a volume of
dkato 0:ee40da884cfc 131 a storage or distribution medium does not bring the other work under
dkato 0:ee40da884cfc 132 the scope of this License.
dkato 0:ee40da884cfc 133
dkato 0:ee40da884cfc 134 3. You may copy and distribute the Program (or a work based on it,
dkato 0:ee40da884cfc 135 under Section 2) in object code or executable form under the terms of
dkato 0:ee40da884cfc 136 Sections 1 and 2 above provided that you also do one of the following:
dkato 0:ee40da884cfc 137
dkato 0:ee40da884cfc 138 a) Accompany it with the complete corresponding machine-readable
dkato 0:ee40da884cfc 139 source code, which must be distributed under the terms of Sections
dkato 0:ee40da884cfc 140 1 and 2 above on a medium customarily used for software interchange; or,
dkato 0:ee40da884cfc 141
dkato 0:ee40da884cfc 142 b) Accompany it with a written offer, valid for at least three
dkato 0:ee40da884cfc 143 years, to give any third party, for a charge no more than your
dkato 0:ee40da884cfc 144 cost of physically performing source distribution, a complete
dkato 0:ee40da884cfc 145 machine-readable copy of the corresponding source code, to be
dkato 0:ee40da884cfc 146 distributed under the terms of Sections 1 and 2 above on a medium
dkato 0:ee40da884cfc 147 customarily used for software interchange; or,
dkato 0:ee40da884cfc 148
dkato 0:ee40da884cfc 149 c) Accompany it with the information you received as to the offer
dkato 0:ee40da884cfc 150 to distribute corresponding source code. (This alternative is
dkato 0:ee40da884cfc 151 allowed only for noncommercial distribution and only if you
dkato 0:ee40da884cfc 152 received the program in object code or executable form with such
dkato 0:ee40da884cfc 153 an offer, in accord with Subsection b above.)
dkato 0:ee40da884cfc 154
dkato 0:ee40da884cfc 155 The source code for a work means the preferred form of the work for
dkato 0:ee40da884cfc 156 making modifications to it. For an executable work, complete source
dkato 0:ee40da884cfc 157 code means all the source code for all modules it contains, plus any
dkato 0:ee40da884cfc 158 associated interface definition files, plus the scripts used to
dkato 0:ee40da884cfc 159 control compilation and installation of the executable. However, as a
dkato 0:ee40da884cfc 160 special exception, the source code distributed need not include
dkato 0:ee40da884cfc 161 anything that is normally distributed (in either source or binary
dkato 0:ee40da884cfc 162 form) with the major components (compiler, kernel, and so on) of the
dkato 0:ee40da884cfc 163 operating system on which the executable runs, unless that component
dkato 0:ee40da884cfc 164 itself accompanies the executable.
dkato 0:ee40da884cfc 165
dkato 0:ee40da884cfc 166 If distribution of executable or object code is made by offering
dkato 0:ee40da884cfc 167 access to copy from a designated place, then offering equivalent
dkato 0:ee40da884cfc 168 access to copy the source code from the same place counts as
dkato 0:ee40da884cfc 169 distribution of the source code, even though third parties are not
dkato 0:ee40da884cfc 170 compelled to copy the source along with the object code.
dkato 0:ee40da884cfc 171
dkato 0:ee40da884cfc 172 4. You may not copy, modify, sublicense, or distribute the Program
dkato 0:ee40da884cfc 173 except as expressly provided under this License. Any attempt
dkato 0:ee40da884cfc 174 otherwise to copy, modify, sublicense or distribute the Program is
dkato 0:ee40da884cfc 175 void, and will automatically terminate your rights under this License.
dkato 0:ee40da884cfc 176 However, parties who have received copies, or rights, from you under
dkato 0:ee40da884cfc 177 this License will not have their licenses terminated so long as such
dkato 0:ee40da884cfc 178 parties remain in full compliance.
dkato 0:ee40da884cfc 179
dkato 0:ee40da884cfc 180 5. You are not required to accept this License, since you have not
dkato 0:ee40da884cfc 181 signed it. However, nothing else grants you permission to modify or
dkato 0:ee40da884cfc 182 distribute the Program or its derivative works. These actions are
dkato 0:ee40da884cfc 183 prohibited by law if you do not accept this License. Therefore, by
dkato 0:ee40da884cfc 184 modifying or distributing the Program (or any work based on the
dkato 0:ee40da884cfc 185 Program), you indicate your acceptance of this License to do so, and
dkato 0:ee40da884cfc 186 all its terms and conditions for copying, distributing or modifying
dkato 0:ee40da884cfc 187 the Program or works based on it.
dkato 0:ee40da884cfc 188
dkato 0:ee40da884cfc 189 6. Each time you redistribute the Program (or any work based on the
dkato 0:ee40da884cfc 190 Program), the recipient automatically receives a license from the
dkato 0:ee40da884cfc 191 original licensor to copy, distribute or modify the Program subject to
dkato 0:ee40da884cfc 192 these terms and conditions. You may not impose any further
dkato 0:ee40da884cfc 193 restrictions on the recipients' exercise of the rights granted herein.
dkato 0:ee40da884cfc 194 You are not responsible for enforcing compliance by third parties to
dkato 0:ee40da884cfc 195 this License.
dkato 0:ee40da884cfc 196
dkato 0:ee40da884cfc 197 7. If, as a consequence of a court judgment or allegation of patent
dkato 0:ee40da884cfc 198 infringement or for any other reason (not limited to patent issues),
dkato 0:ee40da884cfc 199 conditions are imposed on you (whether by court order, agreement or
dkato 0:ee40da884cfc 200 otherwise) that contradict the conditions of this License, they do not
dkato 0:ee40da884cfc 201 excuse you from the conditions of this License. If you cannot
dkato 0:ee40da884cfc 202 distribute so as to satisfy simultaneously your obligations under this
dkato 0:ee40da884cfc 203 License and any other pertinent obligations, then as a consequence you
dkato 0:ee40da884cfc 204 may not distribute the Program at all. For example, if a patent
dkato 0:ee40da884cfc 205 license would not permit royalty-free redistribution of the Program by
dkato 0:ee40da884cfc 206 all those who receive copies directly or indirectly through you, then
dkato 0:ee40da884cfc 207 the only way you could satisfy both it and this License would be to
dkato 0:ee40da884cfc 208 refrain entirely from distribution of the Program.
dkato 0:ee40da884cfc 209
dkato 0:ee40da884cfc 210 If any portion of this section is held invalid or unenforceable under
dkato 0:ee40da884cfc 211 any particular circumstance, the balance of the section is intended to
dkato 0:ee40da884cfc 212 apply and the section as a whole is intended to apply in other
dkato 0:ee40da884cfc 213 circumstances.
dkato 0:ee40da884cfc 214
dkato 0:ee40da884cfc 215 It is not the purpose of this section to induce you to infringe any
dkato 0:ee40da884cfc 216 patents or other property right claims or to contest validity of any
dkato 0:ee40da884cfc 217 such claims; this section has the sole purpose of protecting the
dkato 0:ee40da884cfc 218 integrity of the free software distribution system, which is
dkato 0:ee40da884cfc 219 implemented by public license practices. Many people have made
dkato 0:ee40da884cfc 220 generous contributions to the wide range of software distributed
dkato 0:ee40da884cfc 221 through that system in reliance on consistent application of that
dkato 0:ee40da884cfc 222 system; it is up to the author/donor to decide if he or she is willing
dkato 0:ee40da884cfc 223 to distribute software through any other system and a licensee cannot
dkato 0:ee40da884cfc 224 impose that choice.
dkato 0:ee40da884cfc 225
dkato 0:ee40da884cfc 226 This section is intended to make thoroughly clear what is believed to
dkato 0:ee40da884cfc 227 be a consequence of the rest of this License.
dkato 0:ee40da884cfc 228
dkato 0:ee40da884cfc 229 8. If the distribution and/or use of the Program is restricted in
dkato 0:ee40da884cfc 230 certain countries either by patents or by copyrighted interfaces, the
dkato 0:ee40da884cfc 231 original copyright holder who places the Program under this License
dkato 0:ee40da884cfc 232 may add an explicit geographical distribution limitation excluding
dkato 0:ee40da884cfc 233 those countries, so that distribution is permitted only in or among
dkato 0:ee40da884cfc 234 countries not thus excluded. In such case, this License incorporates
dkato 0:ee40da884cfc 235 the limitation as if written in the body of this License.
dkato 0:ee40da884cfc 236
dkato 0:ee40da884cfc 237 9. The Free Software Foundation may publish revised and/or new versions
dkato 0:ee40da884cfc 238 of the General Public License from time to time. Such new versions will
dkato 0:ee40da884cfc 239 be similar in spirit to the present version, but may differ in detail to
dkato 0:ee40da884cfc 240 address new problems or concerns.
dkato 0:ee40da884cfc 241
dkato 0:ee40da884cfc 242 Each version is given a distinguishing version number. If the Program
dkato 0:ee40da884cfc 243 specifies a version number of this License which applies to it and "any
dkato 0:ee40da884cfc 244 later version", you have the option of following the terms and conditions
dkato 0:ee40da884cfc 245 either of that version or of any later version published by the Free
dkato 0:ee40da884cfc 246 Software Foundation. If the Program does not specify a version number of
dkato 0:ee40da884cfc 247 this License, you may choose any version ever published by the Free Software
dkato 0:ee40da884cfc 248 Foundation.
dkato 0:ee40da884cfc 249
dkato 0:ee40da884cfc 250 10. If you wish to incorporate parts of the Program into other free
dkato 0:ee40da884cfc 251 programs whose distribution conditions are different, write to the author
dkato 0:ee40da884cfc 252 to ask for permission. For software which is copyrighted by the Free
dkato 0:ee40da884cfc 253 Software Foundation, write to the Free Software Foundation; we sometimes
dkato 0:ee40da884cfc 254 make exceptions for this. Our decision will be guided by the two goals
dkato 0:ee40da884cfc 255 of preserving the free status of all derivatives of our free software and
dkato 0:ee40da884cfc 256 of promoting the sharing and reuse of software generally.
dkato 0:ee40da884cfc 257
dkato 0:ee40da884cfc 258 NO WARRANTY
dkato 0:ee40da884cfc 259
dkato 0:ee40da884cfc 260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
dkato 0:ee40da884cfc 261 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
dkato 0:ee40da884cfc 262 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
dkato 0:ee40da884cfc 263 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
dkato 0:ee40da884cfc 264 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
dkato 0:ee40da884cfc 265 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
dkato 0:ee40da884cfc 266 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
dkato 0:ee40da884cfc 267 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
dkato 0:ee40da884cfc 268 REPAIR OR CORRECTION.
dkato 0:ee40da884cfc 269
dkato 0:ee40da884cfc 270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
dkato 0:ee40da884cfc 271 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
dkato 0:ee40da884cfc 272 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
dkato 0:ee40da884cfc 273 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
dkato 0:ee40da884cfc 274 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
dkato 0:ee40da884cfc 275 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
dkato 0:ee40da884cfc 276 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
dkato 0:ee40da884cfc 277 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
dkato 0:ee40da884cfc 278 POSSIBILITY OF SUCH DAMAGES.
dkato 0:ee40da884cfc 279
dkato 0:ee40da884cfc 280 END OF TERMS AND CONDITIONS
dkato 0:ee40da884cfc 281
dkato 0:ee40da884cfc 282 How to Apply These Terms to Your New Programs
dkato 0:ee40da884cfc 283
dkato 0:ee40da884cfc 284 If you develop a new program, and you want it to be of the greatest
dkato 0:ee40da884cfc 285 possible use to the public, the best way to achieve this is to make it
dkato 0:ee40da884cfc 286 free software which everyone can redistribute and change under these terms.
dkato 0:ee40da884cfc 287
dkato 0:ee40da884cfc 288 To do so, attach the following notices to the program. It is safest
dkato 0:ee40da884cfc 289 to attach them to the start of each source file to most effectively
dkato 0:ee40da884cfc 290 convey the exclusion of warranty; and each file should have at least
dkato 0:ee40da884cfc 291 the "copyright" line and a pointer to where the full notice is found.
dkato 0:ee40da884cfc 292
dkato 0:ee40da884cfc 293 <one line to give the program's name and a brief idea of what it does.>
dkato 0:ee40da884cfc 294 Copyright (C) <year> <name of author>
dkato 0:ee40da884cfc 295
dkato 0:ee40da884cfc 296 This program is free software; you can redistribute it and/or modify
dkato 0:ee40da884cfc 297 it under the terms of the GNU General Public License as published by
dkato 0:ee40da884cfc 298 the Free Software Foundation; either version 2 of the License, or
dkato 0:ee40da884cfc 299 (at your option) any later version.
dkato 0:ee40da884cfc 300
dkato 0:ee40da884cfc 301 This program is distributed in the hope that it will be useful,
dkato 0:ee40da884cfc 302 but WITHOUT ANY WARRANTY; without even the implied warranty of
dkato 0:ee40da884cfc 303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dkato 0:ee40da884cfc 304 GNU General Public License for more details.
dkato 0:ee40da884cfc 305
dkato 0:ee40da884cfc 306 You should have received a copy of the GNU General Public License along
dkato 0:ee40da884cfc 307 with this program; if not, write to the Free Software Foundation, Inc.,
dkato 0:ee40da884cfc 308 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dkato 0:ee40da884cfc 309
dkato 0:ee40da884cfc 310 Also add information on how to contact you by electronic and paper mail.
dkato 0:ee40da884cfc 311
dkato 0:ee40da884cfc 312 If the program is interactive, make it output a short notice like this
dkato 0:ee40da884cfc 313 when it starts in an interactive mode:
dkato 0:ee40da884cfc 314
dkato 0:ee40da884cfc 315 Gnomovision version 69, Copyright (C) year name of author
dkato 0:ee40da884cfc 316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
dkato 0:ee40da884cfc 317 This is free software, and you are welcome to redistribute it
dkato 0:ee40da884cfc 318 under certain conditions; type `show c' for details.
dkato 0:ee40da884cfc 319
dkato 0:ee40da884cfc 320 The hypothetical commands `show w' and `show c' should show the appropriate
dkato 0:ee40da884cfc 321 parts of the General Public License. Of course, the commands you use may
dkato 0:ee40da884cfc 322 be called something other than `show w' and `show c'; they could even be
dkato 0:ee40da884cfc 323 mouse-clicks or menu items--whatever suits your program.
dkato 0:ee40da884cfc 324
dkato 0:ee40da884cfc 325 You should also get your employer (if you work as a programmer) or your
dkato 0:ee40da884cfc 326 school, if any, to sign a "copyright disclaimer" for the program, if
dkato 0:ee40da884cfc 327 necessary. Here is a sample; alter the names:
dkato 0:ee40da884cfc 328
dkato 0:ee40da884cfc 329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
dkato 0:ee40da884cfc 330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
dkato 0:ee40da884cfc 331
dkato 0:ee40da884cfc 332 <signature of Ty Coon>, 1 April 1989
dkato 0:ee40da884cfc 333 Ty Coon, President of Vice
dkato 0:ee40da884cfc 334
dkato 0:ee40da884cfc 335 This General Public License does not permit incorporating your program into
dkato 0:ee40da884cfc 336 proprietary programs. If your program is a subroutine library, you may
dkato 0:ee40da884cfc 337 consider it more useful to permit linking proprietary applications with the
dkato 0:ee40da884cfc 338 library. If this is what you want to do, use the GNU Lesser General
dkato 0:ee40da884cfc 339 Public License instead of this License.