diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-04-12 14:12:46 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-04-12 14:12:46 -0700 |
commit | 83f9da3766d579dd9cb8f7bed6f46c6706534c3a (patch) | |
tree | a887cc982c2bc57be7f4735e059bed536135030d | |
parent | ab41edff1becba222e641e215835bd81c50fcaf4 (diff) | |
download | dsub-83f9da3766d579dd9cb8f7bed6f46c6706534c3a.tar.gz dsub-83f9da3766d579dd9cb8f7bed6f46c6706534c3a.tar.bz2 dsub-83f9da3766d579dd9cb8f7bed6f46c6706534c3a.zip |
Broadcast open audiofx session to allow 3d party EQ
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index 154a3d7e..c775da11 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -155,6 +155,11 @@ public class DownloadServiceImpl extends Service implements DownloadService { } }); + Intent i = new Intent(AudioEffect.ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION); + i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, mediaPlayer.getAudioSessionId()); + i.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, getPackageName()); + sendBroadcast(i); + mediaPlayerLooper = Looper.myLooper(); mediaPlayerHandler = new Handler(mediaPlayerLooper); Looper.loop(); @@ -208,6 +213,12 @@ public class DownloadServiceImpl extends Service implements DownloadService { sleepTimer.purge(); } lifecycleSupport.onDestroy(); + + Intent i = new Intent(AudioEffect.ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION); + i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, mediaPlayer.getAudioSessionId()); + i.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, getPackageName()); + sendBroadcast(i); + mediaPlayer.release(); if(nextMediaPlayer != null) { nextMediaPlayer.release(); |