CarGuo/GSYRecordWave


MP3音频录制,支持类似IOS原生的单边或者双边波形显示,低版本音频权限兼容,本地或者在线音频播放的波形显示,录制波形和播放波形会根据声音频率变色的功能,边播边缓存功能,简书入口http://www.jianshu.com/p/2448e2903b07

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.CarGuo:RecordWave:2.0.1'
	}
	dependencies {
		implementation("com.github.CarGuo:RecordWave:2.0.1")
	}
	<dependency>
	    <groupId>com.github.CarGuo</groupId>
	    <artifactId>RecordWave</artifactId>
	    <version>2.0.1</version>
	</dependency>

                            
    libraryDependencies += "com.github.CarGuo" % "RecordWave" % "2.0.1"
        
        

                            
    :dependencies [[com.github.CarGuo/RecordWave "2.0.1"]]
        
        

Readme


MP3音频录制,支持类似IOS原生的单边或者双边波形显示,低版本音频权限兼容,本地或者在线音频播放。可以单纯使用录制功能,也可以单纯使用图形,播放也支持波形显示,录制波形和播放波形会根据声音频率变色的功能,边播边缓存功能。


  • 录制音频为MP3保存本地。
  • 音频权限提示。
  • 显示音频的波形,支持单边与双边,自动根据声音大小和控件高度调整波形高度。
  • 支持获取声音大小。
  • 本地/网络音频播放,音频时长与播放时长支持。
  • 播放MP3显示波形数据。
  • 根据录制和播放的波形根据特征变颜色。
  • 自定义线大小、方向和绘制偏移。

Build Status

在你的项目project下的build.gradle添加

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

在module下的build.gradle添加依赖

dependencies {
     implementation 'com.github.CarGuo:GSYRecordWave:2.0.2'
}

 

简书入口 这里有基础介绍

公众号

效果显示

<img src="https://github.com/CarGuo/RecordWave/blob/master/01.jpg" width="240px" height="426px"/> <img src="https://github.com/CarGuo/RecordWave/blob/master/03.jpg" width="240px" height="426px"/>

动态图效果

<img src="https://github.com/CarGuo/RecordWave/blob/master/01.gif" width="240px" height="426px"/>  

QQ群,有兴趣的可以进来,群里视频项目的人居多,平时多吹水吐槽:174815284 。


2.0.0 (2019-05-26)

支持androidx

1.1.8 (2018-03-01)

  • 修复在某些机器上可能出现的buf销毁问题

1.1.7 (2018-02-27)

  • update seekOffset to long

1.1.6 (2018-01-19)

  • 优化频繁操作的闪动

1.1.5 (2018-01-17)

  • 低版本支持

1.1.4 (2017-09-19)

  • 增加速度、方向、开始偏移、自定义paint接口

历史版本

使用方法请参考demo