rename GetPCM -> GetData in drivers (confusing)
This commit is contained in:
@@ -61,7 +61,7 @@ void RageSound_DSound::MixerThread()
|
|||||||
if(stream_pool[i]->state == stream_pool[i]->INACTIVE)
|
if(stream_pool[i]->state == stream_pool[i]->INACTIVE)
|
||||||
continue; /* inactive */
|
continue; /* inactive */
|
||||||
|
|
||||||
while(stream_pool[i]->GetPCM(false))
|
while(stream_pool[i]->GetData(false))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ void RageSound_DSound::Update(float delta)
|
|||||||
/* If init is true, we're filling the buffer while it's stopped, so put
|
/* If init is true, we're filling the buffer while it's stopped, so put
|
||||||
* data in the current buffer (where the play cursor is); otherwise put
|
* data in the current buffer (where the play cursor is); otherwise put
|
||||||
* it in the opposite buffer. */
|
* it in the opposite buffer. */
|
||||||
bool RageSound_DSound::stream::GetPCM(bool init)
|
bool RageSound_DSound::stream::GetData(bool init)
|
||||||
{
|
{
|
||||||
VDCHECKPOINT;
|
VDCHECKPOINT;
|
||||||
|
|
||||||
@@ -221,13 +221,13 @@ void RageSound_DSound::StartMixing(RageSound *snd)
|
|||||||
/* Pre-buffer the stream. */
|
/* Pre-buffer the stream. */
|
||||||
/* There are two buffers of data; fill them both ahead of time so the
|
/* There are two buffers of data; fill them both ahead of time so the
|
||||||
* sound can start almost immediately. */
|
* sound can start almost immediately. */
|
||||||
stream_pool[i]->GetPCM(true);
|
stream_pool[i]->GetData(true);
|
||||||
stream_pool[i]->str_ds->Play();
|
stream_pool[i]->str_ds->Play();
|
||||||
|
|
||||||
/* Normally, at this point we should still be INACTIVE, in which case,
|
/* Normally, at this point we should still be INACTIVE, in which case,
|
||||||
* tell the mixer thread to start mixing this channel. However, if it's
|
* tell the mixer thread to start mixing this channel. However, if it's
|
||||||
* been changed to STOPPING, then we actually finished the whole file
|
* been changed to STOPPING, then we actually finished the whole file
|
||||||
* in the prebuffering GetPCM calls above, so leave it alone and let it
|
* in the prebuffering GetData calls above, so leave it alone and let it
|
||||||
* finish on its own. */
|
* finish on its own. */
|
||||||
if(stream_pool[i]->state == stream_pool[i]->INACTIVE)
|
if(stream_pool[i]->state == stream_pool[i]->INACTIVE)
|
||||||
stream_pool[i]->state = stream_pool[i]->PLAYING;
|
stream_pool[i]->state = stream_pool[i]->PLAYING;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class RageSound_DSound: public RageSoundDriver
|
|||||||
|
|
||||||
int flush_pos; /* state == STOPPING only */
|
int flush_pos; /* state == STOPPING only */
|
||||||
|
|
||||||
bool GetPCM(bool init);
|
bool GetData(bool init);
|
||||||
|
|
||||||
stream() { str_ds = NULL; snd = NULL; state=INACTIVE; }
|
stream() { str_ds = NULL; snd = NULL; state=INACTIVE; }
|
||||||
~stream();
|
~stream();
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ void RageSound_DSound_Software::MixerThread()
|
|||||||
while(!shutdown) {
|
while(!shutdown) {
|
||||||
Sleep(10);
|
Sleep(10);
|
||||||
|
|
||||||
while(GetPCM())
|
while(GetData())
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RageSound_DSound_Software::GetPCM()
|
bool RageSound_DSound_Software::GetData()
|
||||||
{
|
{
|
||||||
LockMut(SOUNDMAN->lock);
|
LockMut(SOUNDMAN->lock);
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class RageSound_DSound_Software: public RageSoundDriver
|
|||||||
DSound ds;
|
DSound ds;
|
||||||
DSoundBuf *str_ds;
|
DSoundBuf *str_ds;
|
||||||
|
|
||||||
bool GetPCM();
|
bool GetData();
|
||||||
void Update(float delta);
|
void Update(float delta);
|
||||||
|
|
||||||
static int MixerThread_start(void *p);
|
static int MixerThread_start(void *p);
|
||||||
|
|||||||
@@ -54,14 +54,14 @@ void RageSound_WaveOut::MixerThread()
|
|||||||
LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set sound thread priority"));
|
LOG->Warn(werr_ssprintf(GetLastError(), "Failed to set sound thread priority"));
|
||||||
|
|
||||||
while(!shutdown) {
|
while(!shutdown) {
|
||||||
while(GetPCM())
|
while(GetData())
|
||||||
;
|
;
|
||||||
|
|
||||||
WaitForSingleObject(sound_event, 10);
|
WaitForSingleObject(sound_event, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RageSound_WaveOut::GetPCM()
|
bool RageSound_WaveOut::GetData()
|
||||||
{
|
{
|
||||||
LockMutex L(SOUNDMAN->lock);
|
LockMutex L(SOUNDMAN->lock);
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class RageSound_WaveOut: public RageSoundDriver
|
|||||||
void MixerThread();
|
void MixerThread();
|
||||||
SDL_Thread *MixerThreadPtr;
|
SDL_Thread *MixerThreadPtr;
|
||||||
|
|
||||||
bool GetPCM();
|
bool GetData();
|
||||||
void Update(float delta);
|
void Update(float delta);
|
||||||
|
|
||||||
/* virtuals: */
|
/* virtuals: */
|
||||||
|
|||||||
Reference in New Issue
Block a user