mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
make OSS detect blocking, adjust audio API
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@898 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
d40231e29a
commit
a4edca53b4
11 changed files with 92 additions and 99 deletions
|
@ -637,9 +637,8 @@ static void sound_deinit(void)
|
|||
static void writeSound(int len)
|
||||
{
|
||||
int ret;
|
||||
if (PicoOpt&8) len<<=1;
|
||||
|
||||
PsndOut += len;
|
||||
PsndOut += len / 2;
|
||||
/*if (PsndOut > sndBuffer_endptr) {
|
||||
memcpy32((int *)(void *)sndBuffer, (int *)endptr, (PsndOut - endptr + 1) / 2);
|
||||
PsndOut = &sndBuffer[PsndOut - endptr];
|
||||
|
@ -651,7 +650,7 @@ static void writeSound(int len)
|
|||
PsndOut = sndBuffer;
|
||||
|
||||
// signal the snd thread
|
||||
samples_made += len;
|
||||
samples_made += len / 2;
|
||||
if (samples_made - samples_done > samples_block*2) {
|
||||
// lprintf("signal, %i/%i\n", samples_done, samples_made);
|
||||
ret = sceKernelSignalSema(sound_sem, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue