You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Android audio fixes
- Fixes looping issue with ADPCM samples - Fixes Android not looping sound cues correctly - Fixes one shot sound ADPCM problems where sound would get cut early - Removed Android Audio Device update function - was never called and did nothing anyway so this will improve clarity Changed ADPCM decompressor so that it uses the same code to decompress a full file as it does when streaming - old code was correct it was just silly have it duplicated. [CL 2339877 by Robert Jones in Main branch]
This commit is contained in:
@@ -137,19 +137,6 @@ bool FSLESAudioDevice::InitializeHardware( void )
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the audio device and calculates the cached inverse transform later
|
||||
* on used for spatialization.
|
||||
*
|
||||
* @param Realtime whether we are paused or not
|
||||
*/
|
||||
void FSLESAudioDevice::Update( bool Realtime )
|
||||
{
|
||||
//Super::Update( Realtime );
|
||||
|
||||
//@todo android: UDPATE LISTENERS - Android OpenSLES doesn't support 3D, is there anything to do here?
|
||||
}
|
||||
|
||||
FSoundSource* FSLESAudioDevice::CreateSoundSource()
|
||||
{
|
||||
return new FSLESSoundSource(this);
|
||||
|
||||
@@ -34,7 +34,14 @@ void FSLESSoundSource::OnRequeueBufferCallback( SLAndroidSimpleBufferQueueItf In
|
||||
else
|
||||
{
|
||||
// Sound decoding is complete, just waiting to finish playing
|
||||
if (bBuffersToFlush) return;
|
||||
if (bBuffersToFlush)
|
||||
{
|
||||
// set the player's state to stopped
|
||||
SLresult result = (*SL_PlayerPlayInterface)->SetPlayState(SL_PlayerPlayInterface, SL_PLAYSTATE_STOPPED);
|
||||
check(SL_RESULT_SUCCESS == result);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Enqueue the previously decoded buffer
|
||||
SLresult result = (*SL_PlayerBufferQueue)->Enqueue(SL_PlayerBufferQueue, AudioBuffers[BufferInUse].AudioData, AudioBuffers[BufferInUse].AudioDataSize );
|
||||
@@ -415,7 +422,6 @@ void FSLESSoundSource::Stop( void )
|
||||
{
|
||||
if( WaveInstance )
|
||||
{
|
||||
|
||||
// set the player's state to stopped
|
||||
SLresult result = (*SL_PlayerPlayInterface)->SetPlayState(SL_PlayerPlayInterface, SL_PLAYSTATE_STOPPED);
|
||||
check(SL_RESULT_SUCCESS == result);
|
||||
@@ -485,8 +491,6 @@ bool FSLESSoundSource::IsFinished( void )
|
||||
// Check for a non starved, stopped source
|
||||
if( IsSourceFinished() )
|
||||
{
|
||||
|
||||
|
||||
// Notify the wave instance that it has finished playing
|
||||
WaveInstance->NotifyFinished();
|
||||
return true;
|
||||
@@ -516,6 +520,5 @@ bool FSLESSoundSource::IsFinished( void )
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -271,14 +271,6 @@ public:
|
||||
/** Starts up any platform specific hardware/APIs */
|
||||
virtual bool InitializeHardware() override;
|
||||
|
||||
/**
|
||||
* Update the audio device and calculates the cached inverse transform later
|
||||
* on used for spatialization.
|
||||
*
|
||||
* @param Realtime whether we are paused or not
|
||||
*/
|
||||
virtual void Update( bool bGameTicking );
|
||||
|
||||
/** Check if any background music or sound is playing through the audio device */
|
||||
virtual bool IsExernalBackgroundSoundActive() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user