Audio fix

main
Ivan Epifanov 2020-12-04 00:06:15 +03:00 committed by Sam Lantinga
parent 05e5a7cb05
commit e7edb06e7a
1 changed files with 1 additions and 14 deletions

View File

@ -68,20 +68,7 @@ VITAAUD_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
this->spec.samples = SCE_AUDIO_SAMPLE_ALIGN(this->spec.samples);
/* Update the fragment size as size in bytes. */
/* SDL_CalculateAudioSpec(this->spec); MOD */
switch (this->spec.format) {
case AUDIO_U8:
this->spec.silence = 0x80;
break;
default:
this->spec.silence = 0x00;
break;
}
this->spec.size = SDL_AUDIO_BITSIZE(this->spec.format) / 8;
this->spec.size *= this->spec.channels;
this->spec.size *= this->spec.samples;
/* ========================================== */
SDL_CalculateAudioSpec(&this->spec);
/* Allocate the mixing buffer. Its size and starting address must
be a multiple of 64 bytes. Our sample count is already a multiple of