mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-06-05 21:59:31 +02:00
fix #1, store files with proper m4a extension
This commit is contained in:
@@ -58,7 +58,7 @@ class RecorderService : Service() {
|
|||||||
stopRecording()
|
stopRecording()
|
||||||
}
|
}
|
||||||
|
|
||||||
// mp4 output format with aac encoding should produce good enough mp3 files according to https://stackoverflow.com/a/33054794/1967672
|
// mp4 output format with aac encoding should produce good enough m4a files according to https://stackoverflow.com/a/33054794/1967672
|
||||||
private fun startRecording() {
|
private fun startRecording() {
|
||||||
val baseFolder = if (isQPlus()) {
|
val baseFolder = if (isQPlus()) {
|
||||||
cacheDir
|
cacheDir
|
||||||
@@ -71,7 +71,7 @@ class RecorderService : Service() {
|
|||||||
defaultFolder.absolutePath
|
defaultFolder.absolutePath
|
||||||
}
|
}
|
||||||
|
|
||||||
currFilePath = "$baseFolder/${getCurrentFormattedDateTime()}.mp3"
|
currFilePath = "$baseFolder/${getCurrentFormattedDateTime()}.m4a"
|
||||||
recorder = MediaRecorder().apply {
|
recorder = MediaRecorder().apply {
|
||||||
setAudioSource(MediaRecorder.AudioSource.CAMCORDER)
|
setAudioSource(MediaRecorder.AudioSource.CAMCORDER)
|
||||||
setOutputFormat(MediaRecorder.OutputFormat.MPEG_4)
|
setOutputFormat(MediaRecorder.OutputFormat.MPEG_4)
|
||||||
|
Reference in New Issue
Block a user