-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1407 improvements to audio settings #1429
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.quran.labs.androidquran.dao.audio | ||
|
||
import android.os.Parcelable | ||
import com.quran.data.model.SuraAyah | ||
import kotlinx.android.parcel.Parcelize | ||
|
||
@Parcelize | ||
data class AudioPlaybackSettings(val start: SuraAyah, | ||
val end: SuraAyah, | ||
val verseRepeatCount: Int = 0, | ||
val rangeRepeatCount: Int = 0, | ||
val enforceRange: Boolean = false) : Parcelable | ||
Comment on lines
+1
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what if, instead of doing this, we remove this class (and the corresponding changes to read/write this) - and instead do the work in the |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -414,15 +414,8 @@ private void handleIntent(Intent intent) { | |
audioQueue = new AudioQueue(quranInfo, audioRequest, | ||
new AudioPlaybackInfo(start, 1, 1, basmallah)); | ||
Crashlytics.log("audio request has changed..."); | ||
|
||
if (player != null) { | ||
player.stop(); | ||
} | ||
state = State.Stopped; | ||
Crashlytics.log("stop if playing..."); | ||
Comment on lines
-418
to
-422
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. stopping is sometimes the right thing to do - but this is where we should check. you have the old There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the reply @ahmedre I will work on the changes as soon as possible |
||
} | ||
|
||
processTogglePlaybackRequest(); | ||
processTogglePlaybackRequest(); | ||
} else if (ACTION_PLAY.equals(action)) { | ||
processPlayRequest(); | ||
} else if (ACTION_PAUSE.equals(action)) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already use moshi so let's not add gson