Skip to content
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

Implement SDK21 AudioTrack constructor #14081

Merged
merged 2 commits into from
Jun 21, 2018
Merged

Implement SDK21 AudioTrack constructor #14081

merged 2 commits into from
Jun 21, 2018

Conversation

peak3d
Copy link
Contributor

@peak3d peak3d commented Jun 19, 2018

Description

Implement new Audiotrack ctor because the current one is marked deprecated beginning with API 26.

Motivation and Context

Investigating AudioTrack creation issues with Android O

How Has This Been Tested?

Android 6 + 7 / PCM + PT

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@peak3d peak3d added Type: Improvement non-breaking change which improves existing functionality Platform: Android Component: Audio v18 Leia labels Jun 19, 2018
CJNIAudioManager::AUDIO_SESSION_ID_GENERATE);
}
else
jniAt = new CJNIAudioTrack(stream,

This comment was marked as spam.

This comment was marked as spam.

@@ -574,9 +578,8 @@ bool CAESinkAUDIOTRACK::Initialize(AEAudioFormat &format, std::string &device)

void CAESinkAUDIOTRACK::Deinitialize()
{
#ifdef DEBUG_VERBOSE
CLog::Log(LOGDEBUG, "CAESinkAUDIOTRACK::Deinitialize");

This comment was marked as spam.

This comment was marked as spam.

@@ -786,7 +786,7 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
{
AEDelayStatus status;
m_stats.GetDelay(status);
m_extDrainTimer.Set(status.GetDelay() * 1000);
m_extDrainTimer.Set(status.GetDelay() * 1000 + 500);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

CJNIAudioAttributesBuilder attrBuilder;
attrBuilder.setContentType(stream == CJNIAudioManager::STREAM_MUSIC
? CJNIAudioAttributes::CONTENT_TYPE_MUSIC
: CJNIAudioAttributes::CONTENT_TYPE_MOVIE);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

? CJNIAudioAttributes::CONTENT_TYPE_MUSIC
: CJNIAudioAttributes::CONTENT_TYPE_MOVIE);
attrBuilder.setUsage(CJNIAudioAttributes::USAGE_MEDIA);
// attrBuilder.setFlags(CJNIAudioAttributes::FLAG_AUDIBILITY_ENFORCED);

This comment was marked as spam.

@peak3d
Copy link
Contributor Author

peak3d commented Jun 21, 2018

jenkins build this please

@peak3d peak3d added this to the Leia 18.0-alpha2 milestone Jun 21, 2018
@peak3d peak3d merged commit 4c0a23e into xbmc:master Jun 21, 2018
@peak3d peak3d deleted the audiotrack branch June 21, 2018 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Audio Platform: Android Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants