Issue Description
Observed behavior includes an intermittent absence of remote audio playback immediately following channel entry. Although diagnostic metadata and visual indicators suggest successful audio packet reception, no sound is rendered through the output hardware. This condition typically persists and cannot be resolved by standard interaction sequences, such as toggling the local mute state or reinitiating the channel connection.
Platform/SDK
Operating System: Android
SDK: Agora RTC SDK versions 4.5.2.x through 4.6.x
Diagnostic Error Message
Internal SDK logs frequently display repeated warnings from the Audio Stream Manager, referred to as ASM, as shown in the following example:
[ASM]: uid:1 drop old sssrc's audio packet_ssrc:3817834215 new ssrc:1261021072 time:20
Root Cause
The failure originates from a synchronization conflict within the audio pipeline occurring when the receiver handles multiple Synchronization Source identifiers, known as SSRCs, within a condensed timeframe. During periods of network instability or rapid publication and unpublication cycles, the receiving client may process packets associated with both legacy and newly assigned SSRC values simultaneously.
The stream management logic introduced in version 4.5.2.x identifies packets from the preceding SSRC as obsolete and executes a discard operation. This process inadvertently drops valid audio data required for consistent playback, leading to total silence at the application layer. Earlier SDK versions 4.5.2 utilized a different handling strategy for SSRC transitions, which maintained normal playback under similar conditions.
Step-by-Step Solution
Transition to Stabilized SDK Releases
Update to an SDK version that includes the fix to the audio stream management logic (refer to internal update related to
audio_stream_manager.cpp). Such as branch version 4.5.3.1 based on CSD-77848. Recent releases incorporate a refactored audio stream management logic that correctly handles overlapping SSRCs, ensuring that valid packets are not discarded during the synchronization phase.Reduce Media Stream Volatility
If an immediate SDK upgrade is not feasible, implement logic to minimize frequent publication changes. Ensuring that the sending client does not cycle between publish and unpublish states too rapidly reduces the frequency of SSRC updates, thereby decreasing the likelihood of triggering the discard mechanism on the receiving end.
Standardize Connection Lifecycle Sequences
Maintain strict control over the
joinChannelandleaveChannelsequences within the application code. Developers should ensure that the leave channel process reaches a definitive completion callback before the application attempts to invoke a new join command, which helps in maintaining a clean state for the media identifiers.
Best Practice
Applying the updated SDK or following these guidelines will prevent valid audio packets from being dropped and restore normal playback on the receiving side.
Corresponding Document or Link
- CSD-77848