-
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 #54 from praxis-live/code-api-refactor
Code API refactor
- Loading branch information
Showing
107 changed files
with
1,736 additions
and
3,486 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
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
52 changes: 0 additions & 52 deletions
52
praxiscore-audio-code/src/main/java/org/praxislive/audio/code/AudioBodyContext.java
This file was deleted.
Oops, something went wrong.
59 changes: 59 additions & 0 deletions
59
praxiscore-audio-code/src/main/java/org/praxislive/audio/code/AudioCode.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,59 @@ | ||
/* | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | ||
* | ||
* Copyright 2023 Neil C Smith. | ||
* | ||
* This code is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser 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 Lesser General Public License | ||
* version 3 for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License version 3 | ||
* along with this work; if not, see http://www.gnu.org/licenses/ | ||
* | ||
* | ||
* Please visit https://www.praxislive.org if you need additional information or | ||
* have any questions. | ||
*/ | ||
package org.praxislive.audio.code; | ||
|
||
import java.util.List; | ||
import java.util.stream.Stream; | ||
import org.praxislive.code.CodeFactory; | ||
import org.praxislive.code.CodeUtils; | ||
|
||
/** | ||
* Audio code utility functions. | ||
*/ | ||
public class AudioCode { | ||
|
||
private static final List<String> DEFAULT_IMPORTS | ||
= Stream.concat(CodeUtils.defaultImports().stream(), | ||
Stream.of("org.jaudiolibs.pipes.*", | ||
"org.jaudiolibs.pipes.units.*", | ||
"org.praxislive.audio.code.userapi.*", | ||
"static org.praxislive.audio.code.userapi.AudioConstants.*")) | ||
.toList(); | ||
|
||
private static final CodeFactory.Base<AudioCodeDelegate> BASE | ||
= CodeFactory.base(AudioCodeDelegate.class, | ||
DEFAULT_IMPORTS, | ||
(task, delegate) -> new AudioCodeContext(new AudioCodeConnector(task, delegate))); | ||
|
||
private AudioCode() { | ||
|
||
} | ||
|
||
/** | ||
* Access {@link CodeFactory.Base} for {@link AudioCodeDelegate}. | ||
* | ||
* @return code factory base for AudioCodeDelegate. | ||
*/ | ||
public static CodeFactory.Base<AudioCodeDelegate> base() { | ||
return BASE; | ||
} | ||
} |
Oops, something went wrong.