Changed the name of SDL_mutexP() SDL_mutexV()

This commit is contained in:
Sam Lantinga 2013-03-07 20:12:40 -08:00
parent 0707530b35
commit c6388c87c1
17 changed files with 51 additions and 51 deletions

View file

@ -200,7 +200,7 @@ SDL_AudioLockDevice_Default(SDL_AudioDevice * device)
if (device->thread && (SDL_ThreadID() == device->threadid)) {
return;
}
SDL_mutexP(device->mixer_lock);
SDL_LockMutex(device->mixer_lock);
}
static void
@ -209,7 +209,7 @@ SDL_AudioUnlockDevice_Default(SDL_AudioDevice * device)
if (device->thread && (SDL_ThreadID() == device->threadid)) {
return;
}
SDL_mutexV(device->mixer_lock);
SDL_UnlockMutex(device->mixer_lock);
}
@ -407,9 +407,9 @@ SDL_RunAudio(void *devicep)
}
/* Read from the callback into the _input_ stream */
SDL_mutexP(device->mixer_lock);
SDL_LockMutex(device->mixer_lock);
(*fill) (udata, istream, istream_len);
SDL_mutexV(device->mixer_lock);
SDL_UnlockMutex(device->mixer_lock);
/* Convert the audio if necessary and write to the streamer */
if (device->convert.needed) {
@ -480,9 +480,9 @@ SDL_RunAudio(void *devicep)
}
}
SDL_mutexP(device->mixer_lock);
SDL_LockMutex(device->mixer_lock);
(*fill) (udata, stream, stream_len);
SDL_mutexV(device->mixer_lock);
SDL_UnlockMutex(device->mixer_lock);
/* Convert the audio if necessary */
if (device->convert.needed) {

View file

@ -54,18 +54,18 @@ FillSound(void *device, void *stream, size_t len,
if (!audio->paused) {
if (audio->convert.needed) {
SDL_mutexP(audio->mixer_lock);
SDL_LockMutex(audio->mixer_lock);
(*audio->spec.callback) (audio->spec.userdata,
(Uint8 *) audio->convert.buf,
audio->convert.len);
SDL_mutexV(audio->mixer_lock);
SDL_UnlockMutex(audio->mixer_lock);
SDL_ConvertAudio(&audio->convert);
SDL_memcpy(stream, audio->convert.buf, audio->convert.len_cvt);
} else {
SDL_mutexP(audio->mixer_lock);
SDL_LockMutex(audio->mixer_lock);
(*audio->spec.callback) (audio->spec.userdata,
(Uint8 *) stream, len);
SDL_mutexV(audio->mixer_lock);
SDL_UnlockMutex(audio->mixer_lock);
}
}
}

View file

@ -280,10 +280,10 @@ outputCallback(void *inRefCon,
while (remaining > 0) {
if (this->hidden->bufferOffset >= this->hidden->bufferSize) {
/* Generate the data */
SDL_mutexP(this->mixer_lock);
SDL_LockMutex(this->mixer_lock);
(*this->spec.callback)(this->spec.userdata,
this->hidden->buffer, this->hidden->bufferSize);
SDL_mutexV(this->mixer_lock);
SDL_UnlockMutex(this->mixer_lock);
this->hidden->bufferOffset = 0;
}