Skip to content

Instantly share code, notes, and snippets.

@xj999
xj999 / PcmToWavUtil.java
Created July 31, 2019 08:19 — forked from AssIstne/PcmToWavUtil.java
utils to convert pcm byte array to wav byte array
public class PcmToWavUtil {
/**
* @param pcmData pcm原始数据
* @param numChannels 声道设置, mono = 1, stereo = 2
* @param sampleRate 采样频率
* @param bitPerSample 单次数据长度, 例如8bits
* @return wav数据
*/
public static byte[] pcmToWav(byte[] pcmData, int numChannels, int sampleRate, int bitPerSample) {
@xj999
xj999 / build.gradle
Last active August 29, 2015 14:26 — forked from douo/build.gradle
Android 项目打包成 maven 工件,并发布到 jcenter
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
version = "" // 项目的版本名
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {