|
@@ -499,7 +499,9 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
|
|
|
|
|
|
override fun onPause() {
|
|
override fun onPause() {
|
|
super.onPause()
|
|
super.onPause()
|
|
- cancelRecording()
|
|
|
|
|
|
+ if (isRecord) {
|
|
|
|
+ cancelRecording()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
private fun cancelRecording() {
|
|
private fun cancelRecording() {
|
|
@@ -519,7 +521,8 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
|
|
}
|
|
}
|
|
|
|
|
|
private fun getRecordFilePath(): String {
|
|
private fun getRecordFilePath(): String {
|
|
- return "${Config.RECORD_FOLDER}/Project${project.name}_Record_Scene${System.currentTimeMillis()}.mp3"
|
|
|
|
|
|
+ val projectFolder = File(Config.PROJECTS_FOLDER, project.name)
|
|
|
|
+ return "${projectFolder.absolutePath}/Record/${System.currentTimeMillis()}.mp3"
|
|
}
|
|
}
|
|
|
|
|
|
private fun initRecord(){
|
|
private fun initRecord(){
|
|
@@ -535,7 +538,6 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
recordPath = getRecordFilePath()
|
|
recordPath = getRecordFilePath()
|
|
- println("recordPath = $recordPath")
|
|
|
|
audioRecorder.prepare(File(recordPath))
|
|
audioRecorder.prepare(File(recordPath))
|
|
audioRecorder.startRecording()
|
|
audioRecorder.startRecording()
|
|
startRecord.setImageDrawable(resources.getDrawable(R.drawable.ic_btn_record_stop))
|
|
startRecord.setImageDrawable(resources.getDrawable(R.drawable.ic_btn_record_stop))
|