Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring of midi block applied (thanks to Mark Leicester, bugid 22…
…288) git-svn-id: https://svn.apache.org/repos/asf/cocoon/trunk@25411 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Joerg Heinick
committed
Aug 11, 2003
1 parent
d0dcb76
commit ad90728
Showing
19 changed files
with
2,142 additions
and
477 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
<?xml version="1.0"?> | ||
|
||
<xmap xpath="/sitemap/components/generators" unless="generator[@name='midi']"> | ||
|
||
<map:generator name="midi" | ||
src="org.apache.cocoon.generation.MIDIGenerator" | ||
label="content"/> | ||
<xmap xpath="/sitemap/components/generators" unless="generator[@name='xmidi']"> | ||
<map:generator name="xmidi" src="org.apache.cocoon.generation.XMidiGenerator" label="content"/> | ||
</xmap> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0"?> | ||
|
||
<xmap xpath="/sitemap/components/serializers" unless="serializer[@name='xmidi']"> | ||
<map:serializer name="xmidi" src="org.apache.cocoon.serialization.XMidiSerializer"/> | ||
</xmap> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
src/blocks/midi/java/org/apache/cocoon/components/midi/xmidi/ByteLen.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
============================================================================ | ||
The Apache Software License, Version 1.1 | ||
============================================================================ | ||
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. | ||
Redistribution and use in source and binary forms, with or without modifica- | ||
tion, are permitted provided that the following conditions are met: | ||
1. Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
3. The end-user documentation included with the redistribution, if any, must | ||
include the following acknowledgment: "This product includes software | ||
developed by the Apache Software Foundation (http://www.apache.org/)." | ||
Alternately, this acknowledgment may appear in the software itself, if | ||
and wherever such third-party acknowledgments normally appear. | ||
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be | ||
used to endorse or promote products derived from this software without | ||
prior written permission. For written permission, please contact | ||
apache@apache.org. | ||
5. Products derived from this software may not be called "Apache", nor may | ||
"Apache" appear in their name, without prior written permission of the | ||
Apache Software Foundation. | ||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- | ||
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | ||
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
This software consists of voluntary contributions made by many individuals | ||
on behalf of the Apache Software Foundation and was originally created by | ||
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache | ||
Software Foundation, please see <http://www.apache.org/>. | ||
*/ | ||
|
||
package org.apache.cocoon.components.midi.xmidi; | ||
|
||
/** | ||
* The MIDI file parsing parts of this class are based on code from the XMidi project, written | ||
* by Peter Arthur Loeb (http://www.palserv.com/XMidi/) and used with permission. | ||
* The warranty disclaimer of the MIT license (http://www.opensource.org/licenses/mit-license.html) | ||
* applies to Peter Arthur Loeb's code. | ||
* | ||
* @author <a href="mailto:mark.leicester@energyintellect.com">Mark Leicester</a> | ||
* @author <a href="mailto:peter@palserv.com">Peter Loeb</a> | ||
*/ | ||
|
||
public class ByteLen { | ||
/** | ||
* Default constructor. | ||
* As of Jan 8, 2001, this is not used. | ||
*/ | ||
public ByteLen() {} | ||
|
||
/** | ||
* Constructor used in the | ||
* {@link com.palserv.XMidi.MX#deltaToInt(byte[],int) MX.deltaToInt} | ||
* method to create this class, which it then returns. | ||
* @param byte[] b - a byte array; used to set ba | ||
* @param int l - a length; used to set len | ||
*/ | ||
public ByteLen(byte[] b, int l) { | ||
ba = b; | ||
len = l; | ||
} | ||
|
||
/** | ||
* A byte array. | ||
*/ | ||
public byte[] ba; | ||
|
||
/** | ||
* As used in the | ||
* {@link com.palserv.XMidi.MX#deltaToInt(byte[],int) MX.deltaToInt} | ||
* method, it is the length of the delta field being converted, | ||
* not the length of the array. | ||
* <p> | ||
* There is nothing about this class that requires that this variable | ||
* be used in this way. It could be any int. | ||
*/ | ||
public int len; | ||
} |
69 changes: 69 additions & 0 deletions
69
src/blocks/midi/java/org/apache/cocoon/components/midi/xmidi/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
============================================================================ | ||
The Apache Software License, Version 1.1 | ||
============================================================================ | ||
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. | ||
Redistribution and use in source and binary forms, with or without modifica- | ||
tion, are permitted provided that the following conditions are met: | ||
1. Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
3. The end-user documentation included with the redistribution, if any, must | ||
include the following acknowledgment: "This product includes software | ||
developed by the Apache Software Foundation (http://www.apache.org/)." | ||
Alternately, this acknowledgment may appear in the software itself, if | ||
and wherever such third-party acknowledgments normally appear. | ||
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be | ||
used to endorse or promote products derived from this software without | ||
prior written permission. For written permission, please contact | ||
apache@apache.org. | ||
5. Products derived from this software may not be called "Apache", nor may | ||
"Apache" appear in their name, without prior written permission of the | ||
Apache Software Foundation. | ||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | ||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- | ||
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | ||
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
This software consists of voluntary contributions made by many individuals | ||
on behalf of the Apache Software Foundation and was originally created by | ||
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache | ||
Software Foundation, please see <http://www.apache.org/>. | ||
*/ | ||
|
||
package org.apache.cocoon.components.midi.xmidi; | ||
|
||
/** | ||
* The MIDI file parsing parts of this class are based on code from the XMidi project, written | ||
* by Peter Arthur Loeb (http://www.palserv.com/XMidi/) and used with permission. | ||
* The warranty disclaimer of the MIT license (http://www.opensource.org/licenses/mit-license.html) | ||
* applies to Peter Arthur Loeb's code. | ||
* | ||
* @author <a href="mailto:mark.leicester@energyintellect.com">Mark Leicester</a> | ||
* @author <a href="mailto:peter@palserv.com">Peter Loeb</a> | ||
*/ | ||
|
||
|
||
public final class Constants | ||
{ | ||
public static final String VERSION = "1.2"; | ||
|
||
} |
Oops, something went wrong.