mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 03:10:14 +00:00
Merge pull request #4102 from FIX94/master
(WiiU) properly set audio offset before starting playback
This commit is contained in:
commit
01bc910607
@ -79,9 +79,7 @@ void wiiu_ax_callback(void)
|
||||
//buffer underrun, stop playback to let it fill up
|
||||
if(ax->written < AX_AUDIO_SAMPLE_MIN)
|
||||
AXSetMultiVoiceState(ax->mvoice, AX_VOICE_STATE_STOPPED);
|
||||
//make sure to update written value if voice is running
|
||||
if(AXIsMultiVoiceRunning(ax->mvoice))
|
||||
ax->written -= AX_AUDIO_SAMPLE_COUNT;
|
||||
ax->written -= AX_AUDIO_SAMPLE_COUNT;
|
||||
OSUninterruptibleSpinLock_Release(&ax->spinlock);
|
||||
}
|
||||
}
|
||||
@ -188,8 +186,10 @@ static bool ax_audio_start(void* data)
|
||||
|
||||
//set back to playing on enough buffered data
|
||||
if(ax->written > AX_AUDIO_SAMPLE_LOAD)
|
||||
{
|
||||
AXSetMultiVoiceCurrentOffset(ax->mvoice, (ax->pos - ax->written) & AX_AUDIO_COUNT_MASK);
|
||||
AXSetMultiVoiceState(ax->mvoice, AX_VOICE_STATE_PLAYING);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ typedef struct
|
||||
void AXAcquireMultiVoice(uint32_t prio, void *cb, uint32_t cbarg, void *setup, AXMVoice **mvoice);
|
||||
void AXSetMultiVoiceDeviceMix(AXMVoice *mvoice, AXDeviceType type, uint32_t id, uint32_t bus, uint16_t vol, int16_t delta);
|
||||
void AXSetMultiVoiceOffsets(AXMVoice *mvoice, AXVoiceOffsets *offsets);
|
||||
void AXSetMultiVoiceCurrentOffset(AXMVoice *mvoice, uint32_t offset);
|
||||
void AXSetMultiVoiceState(AXMVoice *mvoice, AXVoiceState state);
|
||||
void AXSetMultiVoiceVe(AXMVoice *mvoice, AXVoiceVeData *veData);
|
||||
void AXSetMultiVoiceSrcType(AXMVoice *mvoice, AXVoiceSrcType type);
|
||||
|
@ -149,6 +149,7 @@ IMPORT(AXRegisterFrameCallback);
|
||||
IMPORT(AXAcquireMultiVoice);
|
||||
IMPORT(AXSetMultiVoiceDeviceMix);
|
||||
IMPORT(AXSetMultiVoiceOffsets);
|
||||
IMPORT(AXSetMultiVoiceCurrentOffset);
|
||||
IMPORT(AXSetMultiVoiceState);
|
||||
IMPORT(AXSetMultiVoiceVe);
|
||||
IMPORT(AXSetMultiVoiceSrcType);
|
||||
|
Loading…
Reference in New Issue
Block a user