小编Tha*_*eni的帖子

Java:比较两个音频文件,看它们是否是相同的"音乐"

我正在研究音乐流媒体服务,我遇到了一个问题:如何比较两个音频文件,看它们是否代表同一首歌.这些文件可能没有相同的扩展名(例如OGG,mp3,wma)但可能仍然是同一首歌,并且它们可能具有不同的比特率和音量级别.

java audio

6
推荐指数
1
解决办法
1万
查看次数

将java系统属性传递给ant测试

我有蚂蚁使用以下代码执行jar

  <target name="start.my.jar" description="start my jar">
  <echo message="Starting the jar" />
  <java jar="${jars.dir}/${my.stub.jar}" fork="true" dir="${jars.dir}" spawn="true">
            <sysproperty key="properties.filename" value="${basedir}/path/path/path/filename.properties"/>
        <arg value="start" />
    </java>
</target>
Run Code Online (Sandbox Code Playgroud)

在jar里面有一个包含以下代码的类

public static MyFacade createFacade() throws FileNotFoundException, IOException {
    return createFacade(System.getProperty(properties.filename));
}    
Run Code Online (Sandbox Code Playgroud)

然后有一个配置为这样的蚂蚁测试目标

 <target name="test" depends="compile, support" description="perform unit tests">
    <mkdir dir="${build.test}" />
    <mkdir dir="${test-classes.dir}" />
    <javac srcdir="${build.test}" destdir="${test-classes.dir}" debug="${debug}" nowarn="${nowarn}" includeantruntime="false" deprecation="${deprecation}">
        <classpath refid="main.classpath" />
    </javac>
    <junit printsummary="yes" haltonfailure="yes" showoutput="true" dir="${test-classes.dir}" fork="true" forkmode="perBatch" failureproperty="junit.failure" errorproperty="junit.error" haltonerror="no">
        <jvmarg value="-Xmx1G" />
        <jvmarg value="-Dcom.sun.management.jmxremote" />

        <classpath>
            <pathelement location="${test-classes.dir}" …
Run Code Online (Sandbox Code Playgroud)

java ant

5
推荐指数
1
解决办法
6870
查看次数

标签 统计

java ×2

ant ×1

audio ×1