This repository has been archived by the owner on Dec 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from praxis-live/develop
Merge develop to master for v3.3.0 release
- Loading branch information
Showing
60 changed files
with
2,689 additions
and
254 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,6 +1,6 @@ | ||
Manifest-Version: 1.0 | ||
OpenIDE-Module: org.jaudiolibs.audioservers.javasound | ||
OpenIDE-Module-Localizing-Bundle: org/jaudiolibs/audioservers/javasound/Bundle.properties | ||
OpenIDE-Module-Specification-Version: 1.1.1 | ||
OpenIDE-Module-Specification-Version: 1.2.0 | ||
AutoUpdate-Essential-Module: true | ||
AutoUpdate-Show-In-Client: false |
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 |
---|---|---|
|
@@ -3,6 +3,6 @@ build.xml.script.CRC32=71d0f28d | |
build.xml.stylesheet.CRC32=[email protected] | ||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. | ||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. | ||
nbproject/build-impl.xml.data.CRC32=f86e0190 | ||
nbproject/build-impl.xml.data.CRC32=7f193ec6 | ||
nbproject/build-impl.xml.script.CRC32=cd873414 | ||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.66.1 | ||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.72.1 |
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,4 +1,4 @@ | ||
file.reference.audioservers-javasound-1.1.1.jar=release/modules/ext/audioservers-javasound-1.1.1.jar | ||
file.reference.audioservers-javasound-1.2.0.jar=release/modules/ext/audioservers-javasound-1.2.0.jar | ||
is.autoload=true | ||
javac.source=1.8 | ||
javac.compilerargs=-Xlint -Xlint:-serial |
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
Binary file removed
BIN
-44.9 KB
audio.servers.javasound/release/modules/ext/audioservers-javasound-1.1.1.jar
Binary file not shown.
Binary file added
BIN
+44.9 KB
audio.servers.javasound/release/modules/ext/audioservers-javasound-1.2.0.jar
Binary file not shown.
149 changes: 149 additions & 0 deletions
149
praxis.code/src/net/neilcsmith/praxis/code/ArrayBinding.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,149 @@ | ||
/* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | ||
* | ||
* Copyright 2017 Neil C Smith. | ||
* | ||
* This code is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 3 only, as | ||
* published by the Free Software Foundation. | ||
* | ||
* This code is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* version 3 for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License version 3 | ||
* along with this work; if not, see http://www.gnu.org/licenses/ | ||
* | ||
* | ||
* Please visit http://neilcsmith.net if you need additional information or | ||
* have any questions. | ||
* | ||
*/ | ||
package net.neilcsmith.praxis.code; | ||
|
||
import java.lang.reflect.Field; | ||
//import net.neilcsmith.praxis.code.userapi.Cycle; | ||
import net.neilcsmith.praxis.core.info.ArgumentInfo; | ||
import net.neilcsmith.praxis.core.types.PArray; | ||
import net.neilcsmith.praxis.core.types.PMap; | ||
import net.neilcsmith.praxis.core.types.PNumber; | ||
import net.neilcsmith.praxis.core.types.Value; | ||
|
||
/** | ||
* | ||
* @author Neil C Smith (http://neilcsmith.net) | ||
*/ | ||
abstract class ArrayBinding extends PropertyControl.Binding { | ||
|
||
@Override | ||
public void set(long time, Value value) throws Exception { | ||
set(PArray.coerce(value)); | ||
} | ||
|
||
@Override | ||
public void set(long time, double value) throws Exception { | ||
set(PArray.valueOf(PNumber.valueOf(value))); | ||
} | ||
|
||
abstract void set(PArray value) throws Exception; | ||
|
||
@Override | ||
public ArgumentInfo getArgumentInfo() { | ||
return ArgumentInfo.create(PArray.class, PMap.EMPTY); | ||
} | ||
|
||
@Override | ||
public Value getDefaultValue() { | ||
return PArray.EMPTY; | ||
} | ||
|
||
static boolean isBindableFieldType(Class<?> type) { | ||
return type == PArray.class;// || type == Cycle.class; | ||
} | ||
|
||
static ArrayBinding create(CodeConnector<?> connector, Field field) { | ||
// if (field.getType() == Cycle.class) { | ||
// return new CycleField(field); | ||
// } else | ||
if (field.getType() == PArray.class) { | ||
return new PArrayField(field); | ||
} else { | ||
return null; | ||
} | ||
|
||
} | ||
|
||
// private static class CycleField extends ArrayBinding { | ||
// | ||
// private final Field field; | ||
// private CodeDelegate delegate; | ||
// private Cycle cycle; | ||
// | ||
// private CycleField(Field field) { | ||
// this.field = field; | ||
// } | ||
// | ||
// @Override | ||
// protected void attach(CodeContext<?> context, PropertyControl.Binding previous) { | ||
// this.delegate = context.getDelegate(); | ||
// if (previous instanceof CycleField) { | ||
// cycle = ((CycleField) previous).cycle; | ||
// } else { | ||
// cycle = new Cycle(){}; | ||
// } | ||
// try { | ||
// field.set(delegate, cycle); | ||
// } catch (Exception ex) { | ||
// context.getLog().log(LogLevel.ERROR, ex); | ||
// } | ||
// } | ||
// | ||
// @Override | ||
// void set(PArray value) throws Exception { | ||
// cycle.values(value); | ||
// } | ||
// | ||
// @Override | ||
// public Value get() { | ||
// return cycle.values(); | ||
// } | ||
// | ||
// } | ||
|
||
private static class PArrayField extends ArrayBinding { | ||
|
||
private final Field field; | ||
private CodeDelegate delegate; | ||
|
||
private PArrayField(Field field) { | ||
this.field = field; | ||
} | ||
|
||
@Override | ||
protected void attach(CodeContext<?> context) { | ||
this.delegate = context.getDelegate(); | ||
try { | ||
set(PArray.EMPTY); | ||
} catch (Exception ex) { | ||
// ignore | ||
} | ||
} | ||
|
||
@Override | ||
void set(PArray value) throws Exception { | ||
field.set(delegate, value); | ||
} | ||
|
||
@Override | ||
public Value get() { | ||
try { | ||
return (PArray) field.get(delegate); | ||
} catch (Exception ex) { | ||
return PArray.EMPTY; | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
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
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
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
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
Oops, something went wrong.