Skip to content

Commit

Permalink
UPDATE Version 2.0.0 Includes new units tests, javadoc rewrite and
Browse files Browse the repository at this point in the history
refactoring
  • Loading branch information
philfrei committed Jun 23, 2022
1 parent 83e1da4 commit cb4ba27
Show file tree
Hide file tree
Showing 12 changed files with 1,344 additions and 899 deletions.
1 change: 0 additions & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
Expand Down
2 changes: 1 addition & 1 deletion .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# AudioCue-maven
*AudioCue* is a Java audio-playback class, modeled on [javax.sound.sampled.Clip](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/sound/sampled/Clip.html),
enhanced with concurrent playback and with dynamic handling of volume, pan and frequency.
Included is a mixer that can be optionally used to merge the output of multiple *AudioCues* into a single line out.

This project changes the build tool of [an earlier version of AudioCue](https://github.com/philfrei/AudioCue) from *Gradle* to *Maven*.
A goal: publication via *Sonatype/Maven Central*.
In support of that goal, unit tests have been added, and some errors and shortcomings uncovered by those tests have been corrected.
With the two projects starting to diverge, I recommend preferring these more recent builds.

Until *AudioCue* is available at *Maven Central*, the best way to make use of the **AudioCue** class is to fork this project, then clone it to a development environment.
From there, you can execute Maven's *install* command, which will put the library into your local Maven repository.
Or, you can directly make use of the jar file that is created in the **/target** subdirectory via the *package* command by adding this jar file to your project's classpath.
Also, since there are only five files, you can consider copying these files directly into your project.
Just be sure, if you do, to edit the *package* lines of the files to appropriately reflect the new file locations.

To use *AudioCue* in a Maven project, add the following dependency to your project's POM file.

<dependency>
<groupId>com.adonax</groupId>
<artifactId>audiocue</artifactId>
<version>1.1.0</version>
</dependency>

The API can be generated via the Javadoc tool. At this time, the API for this project and the earlier [Gradle-based AudioCue](https://github.com/philfrei/AudioCue) are close to identical,
with the only divergence being that the *AudioCueMixer* **.getTrackLength()** method has been renamed
**.getTracksCount()**.
This API can be viewed [here](http://adonax.com/AudioCue/api).
*TODO: generate a new Javadoc API.*
*AudioCue* is a Java audio-playback class, modeled on
[javax.sound.sampled.Clip](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/sound/sampled/Clip.html),
enhanced with concurrent playback and with dynamic handling of volume, pan and frequency. Included is a mixer
that can be optionally used to merge the output of multiple *AudioCues* into a single line out.

In this project, the build tool is Maven. The [previous version](https://github.com/philfrei/AudioCue) used Gradle.
A goal: publication via *Sonatype/Maven Central*. In support of that goal, unit tests have been added,
and more rigorous API documentation has been written. Over the course of making these changes, some errors
and shortcomings were uncovered and have been corrected. The changes are extensive enough that this project
will be designated version 2.0.0.

Until *AudioCue* is available at *Maven Central*, the best way to make use of the **AudioCue** class is
to fork this project, then clone it to a development environment. From there, executing Maven's
*install* command will put the library into the local Maven repository. Or, you can directly make
use of the jar file that is created in the **/target** subdirectory via the *package* command by adding
this jar file to your project's classpath. Also, since there are only a few files, you can consider
simply copying these files directly into your project. Just be sure, if you do, to edit the *package*
lines of the files to appropriately reflect the new file locations.

To use *AudioCue* as a Maven dependency, add the following to your project's POM file.

<dependencies>
<dependency>
<groupId>com.adonax</groupId>
<artifactId>audiocue</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>

## Usage
### Basic playback (for "fire-and-forget" use)
Expand Down
46 changes: 46 additions & 0 deletions cd
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[--super-prefix=<path>] [--config-env=<name>=<envvar>]
<command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
restore Restore working tree files
rm Remove files from the working tree and from the index
sparse-checkout Initialize and modify the sparse-checkout

examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
diff Show changes between commits, commit and working tree, etc
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status

grow, mark and tweak your common history
branch List, create, or delete branches
commit Record changes to the repository
merge Join two or more development histories together
rebase Reapply commits on top of another base tip
reset Reset current HEAD to the specified state
switch Switch branches
tag Create, list, delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.
Empty file added gpg-connect-agent
Empty file.
111 changes: 104 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,48 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.adonax</groupId>
<artifactId>audiocue</artifactId>
<version>1.1.0</version>
<version>2.0.0</version>

<name>AudioCue</name>
<description>AudioCue is an audio-playback class modeled on javax.sound.sampled.Clip, that has
been enhanced with concurrent playback and dynamic handling of volume, pan and frequency.
</description>
<!-- <url>https://github.com/philfrei/AudioCue-maven</url>
--> <licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>

<developers>
<developer>
<name>Phil Freihofner</name>
<email>phil@adonax.com</email>
<organization>Adonax</organization>
<organizationUrl>https://adonax.com</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/philfrei/Audiocue-Maven.git</connection>
<developerConnection>scm:git:ssh://github.com:philfrei/AudioCue-maven.git</developerConnection>
<url>http://github.com/philfrei/Audiocue-Maven/tree/main</url>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>


<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -16,21 +53,81 @@

<build>
<plugins>
<plugin>
<!-- This is the plugin that I successfully used to deploy locally.
The instructions could be clearer about whether this is needed if we are using the
nexus-staging-maven-plugin.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin> -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Temporarily dropping this as we progressively test. Earlier, received
errors pertaining to module and Java 7 being invoked, which makes
little sense. -->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

</project>
Loading

0 comments on commit cb4ba27

Please sign in to comment.