mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 17:47:12 -04:00
Wii: set unused voice channel in Audio_SetFormat
if it's set in Audio_Init, all sounds will be on the same channel, causing cut-offs
This commit is contained in:
parent
38736b2a25
commit
0676d409a4
@ -1172,7 +1172,7 @@ void MusicCallback(s32 voice) {
|
||||
}
|
||||
|
||||
cc_result Audio_Init(struct AudioContext* ctx, int buffers) {
|
||||
ctx->chanID = ASND_GetFirstUnusedVoice();;
|
||||
ctx->chanID = -1;
|
||||
ctx->count = buffers;
|
||||
ctx->volume = 255;
|
||||
ctx->bufHead = 0;
|
||||
@ -1195,6 +1195,7 @@ cc_result Audio_SetFormat(struct AudioContext* ctx, int channels, int sampleRate
|
||||
sampleRate = Audio_AdjustSampleRate(sampleRate, playbackRate);
|
||||
ctx->channels = channels;
|
||||
ctx->sampleRate = sampleRate;
|
||||
ctx->chanID = ASND_GetFirstUnusedVoice();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user