mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Merge pull request #4040 from FIX94/master
(WiiU) more audio driver cleanup
This commit is contained in:
commit
797ef01b85
@ -106,18 +106,18 @@ static void* ax_audio_init(const char* device, unsigned rate, unsigned latency)
|
|||||||
DCFlushRange(ax->buffer_r,AX_AUDIO_SIZE);
|
DCFlushRange(ax->buffer_r,AX_AUDIO_SIZE);
|
||||||
|
|
||||||
//shared by both voices
|
//shared by both voices
|
||||||
AXVoiceOffsets offsets;
|
AXVoiceOffsets offsets[2];
|
||||||
offsets.currentOffset = 0;
|
offsets[0].currentOffset = 0;
|
||||||
offsets.loopOffset = 0;
|
offsets[0].loopOffset = 0;
|
||||||
offsets.endOffset = AX_AUDIO_COUNT - 1;
|
offsets[0].endOffset = AX_AUDIO_COUNT - 1;
|
||||||
offsets.loopingEnabled = AX_VOICE_LOOP_ENABLED;
|
offsets[0].loopingEnabled = AX_VOICE_LOOP_ENABLED;
|
||||||
offsets.dataType = AX_VOICE_FORMAT_LPCM16;
|
offsets[0].dataType = AX_VOICE_FORMAT_LPCM16;
|
||||||
|
memcpy(&offsets[1], &offsets[0], sizeof(AXVoiceOffsets));
|
||||||
|
|
||||||
offsets.data = ax->buffer_l;
|
//different buffers per voice
|
||||||
AXSetVoiceOffsets(ax->mvoice->v[0], &offsets);
|
offsets[0].data = ax->buffer_l;
|
||||||
|
offsets[1].data = ax->buffer_r;
|
||||||
offsets.data = ax->buffer_r;
|
AXSetMultiVoiceOffsets(ax->mvoice, offsets);
|
||||||
AXSetVoiceOffsets(ax->mvoice->v[1], &offsets);
|
|
||||||
|
|
||||||
AXSetMultiVoiceSrcType(ax->mvoice, AX_VOICE_SRC_TYPE_NONE);
|
AXSetMultiVoiceSrcType(ax->mvoice, AX_VOICE_SRC_TYPE_NONE);
|
||||||
AXSetMultiVoiceSrcRatio(ax->mvoice, 1.0f);
|
AXSetMultiVoiceSrcRatio(ax->mvoice, 1.0f);
|
||||||
@ -125,15 +125,8 @@ static void* ax_audio_init(const char* device, unsigned rate, unsigned latency)
|
|||||||
AXVoiceVeData ve = {0xF000, 0};
|
AXVoiceVeData ve = {0xF000, 0};
|
||||||
AXSetMultiVoiceVe(ax->mvoice, &ve);
|
AXSetMultiVoiceVe(ax->mvoice, &ve);
|
||||||
|
|
||||||
u32 mix[24] = {0};
|
AXSetMultiVoiceDeviceMix(ax->mvoice, AX_DEVICE_TYPE_DRC, 0, 0, 0x8000, 0);
|
||||||
mix[0] = 0x80000000;
|
AXSetMultiVoiceDeviceMix(ax->mvoice, AX_DEVICE_TYPE_TV, 0, 0, 0x8000, 0);
|
||||||
AXSetVoiceDeviceMix(ax->mvoice->v[0], AX_DEVICE_TYPE_DRC, 0, (AXVoiceDeviceMixData*)mix);
|
|
||||||
AXSetVoiceDeviceMix(ax->mvoice->v[0], AX_DEVICE_TYPE_TV, 0, (AXVoiceDeviceMixData*)mix);
|
|
||||||
|
|
||||||
mix[0] = 0;
|
|
||||||
mix[4] = 0x80000000;
|
|
||||||
AXSetVoiceDeviceMix(ax->mvoice->v[1], AX_DEVICE_TYPE_DRC, 0, (AXVoiceDeviceMixData*)mix);
|
|
||||||
AXSetVoiceDeviceMix(ax->mvoice->v[1], AX_DEVICE_TYPE_TV, 0, (AXVoiceDeviceMixData*)mix);
|
|
||||||
|
|
||||||
AXSetMultiVoiceState(ax->mvoice, AX_VOICE_STATE_STOPPED);
|
AXSetMultiVoiceState(ax->mvoice, AX_VOICE_STATE_STOPPED);
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ typedef struct
|
|||||||
} AXMVoice;
|
} AXMVoice;
|
||||||
|
|
||||||
void AXAcquireMultiVoice(uint32_t prio, void *cb, uint32_t cbarg, void *setup, AXMVoice **mvoice);
|
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 AXSetMultiVoiceState(AXMVoice *mvoice, AXVoiceState state);
|
void AXSetMultiVoiceState(AXMVoice *mvoice, AXVoiceState state);
|
||||||
void AXSetMultiVoiceVe(AXMVoice *mvoice, AXVoiceVeData *veData);
|
void AXSetMultiVoiceVe(AXMVoice *mvoice, AXVoiceVeData *veData);
|
||||||
void AXSetMultiVoiceSrcType(AXMVoice *mvoice, AXVoiceSrcType type);
|
void AXSetMultiVoiceSrcType(AXMVoice *mvoice, AXVoiceSrcType type);
|
||||||
|
@ -3,6 +3,8 @@ EXPORT_BEGIN(sndcore2.rpl);
|
|||||||
|
|
||||||
#include "../rpl/libsndcore2/exports.h"
|
#include "../rpl/libsndcore2/exports.h"
|
||||||
EXPORT(AXAcquireMultiVoice);
|
EXPORT(AXAcquireMultiVoice);
|
||||||
|
EXPORT(AXSetMultiVoiceDeviceMix);
|
||||||
|
EXPORT(AXSetMultiVoiceOffsets);
|
||||||
EXPORT(AXSetMultiVoiceState);
|
EXPORT(AXSetMultiVoiceState);
|
||||||
EXPORT(AXSetMultiVoiceVe);
|
EXPORT(AXSetMultiVoiceVe);
|
||||||
EXPORT(AXSetMultiVoiceSrcType);
|
EXPORT(AXSetMultiVoiceSrcType);
|
||||||
|
Loading…
Reference in New Issue
Block a user