small correction

This commit is contained in:
FIX94 2016-11-22 03:18:36 +01:00
parent 73a58f1b50
commit 1c990c691c

View File

@ -73,7 +73,7 @@ void wiiu_ax_callback(void)
ax_audio_t *ax = (ax_audio_t*)wiiu_cb_ax; ax_audio_t *ax = (ax_audio_t*)wiiu_cb_ax;
if(AXIsMultiVoiceRunning(ax->mvoice)) if(AXIsMultiVoiceRunning(ax->mvoice))
{ {
if(OSUninterruptibleSpinLock_TryAcquire(&ax->spinlock)) if(OSUninterruptibleSpinLock_Acquire(&ax->spinlock))
{ {
//buffer underrun, stop playback to let it fill up //buffer underrun, stop playback to let it fill up
if(ax->written < AX_AUDIO_SAMPLE_MIN) if(ax->written < AX_AUDIO_SAMPLE_MIN)
@ -258,10 +258,11 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size)
DCStoreRange(ax->buffer_r, flushP2); DCStoreRange(ax->buffer_r, flushP2);
} }
//add in new audio data //add in new audio data
OSUninterruptibleSpinLock_Acquire(&ax->spinlock); if(OSUninterruptibleSpinLock_Acquire(&ax->spinlock))
ax->written += count; {
OSUninterruptibleSpinLock_Release(&ax->spinlock); ax->written += count;
OSUninterruptibleSpinLock_Release(&ax->spinlock);
}
//possibly buffer underrun //possibly buffer underrun
if(!AXIsMultiVoiceRunning(ax->mvoice)) if(!AXIsMultiVoiceRunning(ax->mvoice))
{ {