Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import io.agora.api.example.examples.advanced.SetAudioProfile;
import io.agora.api.example.examples.advanced.MultiProcess;
import io.agora.api.example.examples.advanced.VideoQuickSwitch;
import io.agora.api.example.examples.advanced.RTMPInjection;
import io.agora.api.example.examples.advanced.RTMPStreaming;
import io.agora.api.example.examples.advanced.StreamEncrypt;
import io.agora.api.example.examples.advanced.SwitchCameraScreenShare;
Expand Down Expand Up @@ -112,9 +111,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
case R.id.action_mainFragment_to_GeoFencing:
fragment = new GeoFencing();
break;
case R.id.action_mainFragment_to_RTMPInjection:
fragment = new RTMPInjection();
break;
case R.id.action_mainFragment_to_RTMPStreaming:
fragment = new RTMPStreaming();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,6 @@ public void onError(int err)
{
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,6 @@ public void onError(int err)
{
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,6 @@ public void onError(int err) {
handler.post(() -> join.setEnabled(true));
} else
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,6 @@ public void onError(int err)
{
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,6 @@ public void onError(int err)
{
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,6 @@ public void onError(int err)
{
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,15 +321,6 @@ public void onError(int err)
{
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public class ProcessAudioRawData extends BaseFragment implements View.OnClickLis
private boolean isEnableLoopBack = false;
private AudioPlayer mAudioPlayer;
private static final Integer SAMPLE_RATE = 44100;
private static final Integer SAMPLES_PER_CALL = 4410;
private static final Integer SAMPLE_NUM_OF_CHANNEL = 1;

@Override
Expand Down Expand Up @@ -238,6 +239,9 @@ public boolean onPlaybackFrameBeforeMixingEx(byte[] samples, int numOfSamples, i
return false;
}
});
engine.setRecordingAudioFrameParameters(SAMPLE_RATE, SAMPLE_NUM_OF_CHANNEL, Constants.RAW_AUDIO_FRAME_OP_MODE_READ_WRITE, SAMPLES_PER_CALL);
engine.setMixedAudioFrameParameters(SAMPLE_RATE, SAMPLES_PER_CALL);
engine.setPlaybackAudioFrameParameters(SAMPLE_RATE, SAMPLE_NUM_OF_CHANNEL, Constants.RAW_AUDIO_FRAME_OP_MODE_READ_WRITE, SAMPLES_PER_CALL);
mAudioPlayer = new AudioPlayer(AudioManager.STREAM_VOICE_CALL, SAMPLE_RATE, SAMPLE_NUM_OF_CHANNEL, AudioFormat.CHANNEL_OUT_MONO);
}
catch (Exception e) {
Expand Down Expand Up @@ -382,15 +386,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,6 @@ public void onWarning(int warn) {
public void onError(int err) {
Log.e(TAG, String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
showAlert(String.format("onError code %d message %s", err, RtcEngine.getErrorDescription(err)));
/** Upload current log file immediately to server.
* only use this when an error occurs
* block before log file upload success or timeout.
*
* @return
* - 0: Success.
* - < 0: Failure.
*/
engine.uploadLogFile();
}

/**Occurs when a user leaves the channel.
Expand Down
Loading