Skip to content

Commit

Permalink
feat: Add explanation to SaveFolderTile.kt for DCIM folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Jan 5, 2024
1 parent 42f8262 commit 300825e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/src/main/java/app/myzel394/alibi/helpers/AudioBatchesFolder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ class AudioBatchesFolder(
) {
override val concatenationFunction = ::concatenateAudioFiles
override val ffmpegParameters = FFMPEG_PARAMETERS
override val scopedMediaContentUri: Uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI
override val legacyMediaFolder = File(
Environment.getExternalStoragePublicDirectory(BASE_LEGACY_STORAGE_FOLDER),
MEDIA_RECORDINGS_SUBFOLDER,
)
override val scopedMediaContentUri: Uri = SCOPED_MEDIA_CONTENT_URI
override val legacyMediaFolder = LEGACY_MEDIA_FOLDER

private var customFileFileDescriptor: ParcelFileDescriptor? = null
private var mediaFileFileDescriptor: ParcelFileDescriptor? = null
Expand Down Expand Up @@ -154,6 +151,15 @@ class AudioBatchesFolder(
val SCOPED_STORAGE_RELATIVE_PATH =
BASE_SCOPED_STORAGE_RELATIVE_PATH + "/" + MEDIA_RECORDINGS_SUBFOLDER

// Don't use those values directly, use the constants from the instance.
// Those values are only used inside the `SaveFolderTile`
val SCOPED_MEDIA_CONTENT_URI = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI
val LEGACY_MEDIA_FOLDER = File(
Environment.getExternalStoragePublicDirectory(BASE_LEGACY_STORAGE_FOLDER),
MEDIA_RECORDINGS_SUBFOLDER,
)


// Parameters to be passed in descending order
// Those parameters first try to concatenate without re-encoding
// if that fails, it'll try several fallback methods
Expand Down

0 comments on commit 300825e

Please sign in to comment.