Play sound to other part when holding call.
This commit is contained in:
parent
817c80c046
commit
9439e29a24
4 changed files with 13 additions and 3 deletions
BIN
res/raw/toy-mono.wav
Normal file
BIN
res/raw/toy-mono.wav
Normal file
Binary file not shown.
|
@ -158,6 +158,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
mLinphoneRootCaFile = basePath + "/rootca.pem";
|
||||
mRingSoundFile = basePath + "/oldphone_mono.wav";
|
||||
mRingbackSoundFile = basePath + "/ringback.wav";
|
||||
mPauseSoundFile = basePath + "/toy-mono.wav";
|
||||
|
||||
sLPref = LinphonePreferenceManager.getInstance(c);
|
||||
mAudioManager = ((AudioManager) c.getSystemService(Context.AUDIO_SERVICE));
|
||||
|
@ -176,6 +177,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
private final String mLinphoneConfigFile;
|
||||
private final String mRingSoundFile;
|
||||
private final String mRingbackSoundFile;
|
||||
private final String mPauseSoundFile;
|
||||
|
||||
private Timer mTimer = new Timer("Linphone scheduler");
|
||||
|
||||
|
@ -414,6 +416,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
mLc.setPlaybackGain(3);
|
||||
mLc.setRing(null);
|
||||
mLc.setRootCA(mLinphoneRootCaFile);
|
||||
mLc.setPlayFile(mPauseSoundFile);
|
||||
|
||||
|
||||
try {
|
||||
|
@ -442,6 +445,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
private void copyAssetsFromPackage() throws IOException {
|
||||
copyIfNotExist(R.raw.oldphone_mono,mRingSoundFile);
|
||||
copyIfNotExist(R.raw.ringback,mRingbackSoundFile);
|
||||
copyIfNotExist(R.raw.toy,mPauseSoundFile);
|
||||
copyFromPackage(R.raw.linphonerc, new File(mLinphoneInitialConfigFile).getName());
|
||||
copyIfNotExist(R.raw.rootca, new File(mLinphoneRootCaFile).getName());
|
||||
}
|
||||
|
|
|
@ -615,4 +615,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public boolean mediaEncryptionSupported(MediaEncryption menc) {
|
||||
return mediaEncryptionSupported(nativePtr,menc.mValue);
|
||||
}
|
||||
|
||||
private native void setPlayFile(long nativePtr, String path);
|
||||
@Override
|
||||
public void setPlayFile(String path) {
|
||||
setPlayFile(nativePtr, path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8c2d49fae3ef0fd8066350bfeaff959442b2e6c3
|
||||
Subproject commit 6892c98ccdcec6449eac51f19c932fdcbf956695
|
Loading…
Reference in a new issue