mirror of https://github.com/encounter/SDL.git
psp: Force channels to stereo if user requested anything other than mono.
Before it would only clamp to stereo if it also had to resample, which would fail if the app specified 44100Hz and surround sound.
This commit is contained in:
parent
c275436f56
commit
5d07c03613
|
@ -64,6 +64,7 @@ PSPAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||||
format = PSP_AUDIO_FORMAT_MONO;
|
format = PSP_AUDIO_FORMAT_MONO;
|
||||||
} else {
|
} else {
|
||||||
format = PSP_AUDIO_FORMAT_STEREO;
|
format = PSP_AUDIO_FORMAT_STEREO;
|
||||||
|
this->spec.channels = 2; /* we're forcing the hardware to stereo. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PSP has some limitations with the Audio. It fully supports 44.1KHz (Mono & Stereo),
|
/* PSP has some limitations with the Audio. It fully supports 44.1KHz (Mono & Stereo),
|
||||||
|
@ -73,7 +74,6 @@ PSPAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||||
this->hidden->channel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, this->spec.samples, format);
|
this->hidden->channel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, this->spec.samples, format);
|
||||||
} else {
|
} else {
|
||||||
this->hidden->channel = sceAudioSRCChReserve(this->spec.samples, this->spec.freq, 2);
|
this->hidden->channel = sceAudioSRCChReserve(this->spec.samples, this->spec.freq, 2);
|
||||||
this->spec.channels = 2; /* we're forcing the hardware to stereo. */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->hidden->channel < 0) {
|
if (this->hidden->channel < 0) {
|
||||||
|
|
Loading…
Reference in New Issue