mirror of https://github.com/snes9xgit/snes9x.git
Remove S9xFinalizeSamples.
This commit is contained in:
parent
a9a646eb60
commit
2164c86158
|
@ -120,10 +120,6 @@ int S9xGetSampleCount(void)
|
||||||
return spc::resampler->avail();
|
return spc::resampler->avail();
|
||||||
}
|
}
|
||||||
|
|
||||||
void S9xFinalizeSamples(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void S9xLandSamples(void)
|
void S9xLandSamples(void)
|
||||||
{
|
{
|
||||||
if (spc::callback != NULL)
|
if (spc::callback != NULL)
|
||||||
|
|
|
@ -24,7 +24,6 @@ void S9xAPUExecute (void);
|
||||||
void S9xAPUEndScanline (void);
|
void S9xAPUEndScanline (void);
|
||||||
void S9xAPUSetReferenceTime (int32);
|
void S9xAPUSetReferenceTime (int32);
|
||||||
void S9xAPUTimingSetSpeedup (int);
|
void S9xAPUTimingSetSpeedup (int);
|
||||||
void S9xAPUAllowTimeOverflow (bool);
|
|
||||||
void S9xAPULoadState (uint8 *);
|
void S9xAPULoadState (uint8 *);
|
||||||
void S9xAPULoadBlarggState(uint8 *oldblock);
|
void S9xAPULoadBlarggState(uint8 *oldblock);
|
||||||
void S9xAPUSaveState (uint8 *);
|
void S9xAPUSaveState (uint8 *);
|
||||||
|
@ -39,7 +38,6 @@ int S9xGetSampleCount (void);
|
||||||
void S9xSetSoundControl (uint8);
|
void S9xSetSoundControl (uint8);
|
||||||
void S9xSetSoundMute (bool8);
|
void S9xSetSoundMute (bool8);
|
||||||
void S9xLandSamples (void);
|
void S9xLandSamples (void);
|
||||||
void S9xFinalizeSamples (void);
|
|
||||||
void S9xClearSamples (void);
|
void S9xClearSamples (void);
|
||||||
bool8 S9xMixSamples (uint8 *, int);
|
bool8 S9xMixSamples (uint8 *, int);
|
||||||
void S9xSetSamplesAvailableCallback (apu_callback, void *);
|
void S9xSetSamplesAvailableCallback (apu_callback, void *);
|
||||||
|
|
|
@ -176,7 +176,6 @@ void S9xAlsaSoundDriver::samples_available()
|
||||||
output_buffer_size);
|
output_buffer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
S9xFinalizeSamples();
|
|
||||||
int snes_frames_available = S9xGetSampleCount() >> 1;
|
int snes_frames_available = S9xGetSampleCount() >> 1;
|
||||||
|
|
||||||
if (Settings.DynamicRateControl && !Settings.SoundSync)
|
if (Settings.DynamicRateControl && !Settings.SoundSync)
|
||||||
|
|
|
@ -164,8 +164,6 @@ void S9xOSSSoundDriver::samples_available()
|
||||||
S9xUpdateDynamicRate(info.bytes, output_buffer_size);
|
S9xUpdateDynamicRate(info.bytes, output_buffer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
S9xFinalizeSamples();
|
|
||||||
|
|
||||||
samples_to_write = S9xGetSampleCount();
|
samples_to_write = S9xGetSampleCount();
|
||||||
|
|
||||||
if (Settings.DynamicRateControl && !Settings.SoundSync)
|
if (Settings.DynamicRateControl && !Settings.SoundSync)
|
||||||
|
|
|
@ -187,7 +187,6 @@ void S9xPortAudioSoundDriver::samples_available()
|
||||||
S9xUpdateDynamicRate(frames_to_bytes(frames), output_buffer_size);
|
S9xUpdateDynamicRate(frames_to_bytes(frames), output_buffer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
S9xFinalizeSamples();
|
|
||||||
int snes_frames_available = S9xGetSampleCount() >> 1;
|
int snes_frames_available = S9xGetSampleCount() >> 1;
|
||||||
|
|
||||||
if (Settings.DynamicRateControl && !Settings.SoundSync)
|
if (Settings.DynamicRateControl && !Settings.SoundSync)
|
||||||
|
|
|
@ -224,8 +224,6 @@ void S9xPulseSoundDriver::samples_available()
|
||||||
S9xUpdateDynamicRate(bytes, buffer_size);
|
S9xUpdateDynamicRate(bytes, buffer_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
S9xFinalizeSamples();
|
|
||||||
|
|
||||||
samples = S9xGetSampleCount();
|
samples = S9xGetSampleCount();
|
||||||
|
|
||||||
if (Settings.DynamicRateControl && !Settings.SoundSync)
|
if (Settings.DynamicRateControl && !Settings.SoundSync)
|
||||||
|
|
|
@ -612,7 +612,6 @@ static void S9xAudioCallback(void*)
|
||||||
// This is called every time 128 to 132 samples are generated, which happens about 8 times per frame. A buffer size of 256 samples is enough here.
|
// This is called every time 128 to 132 samples are generated, which happens about 8 times per frame. A buffer size of 256 samples is enough here.
|
||||||
static int16_t audio_buf[BUFFER_SIZE];
|
static int16_t audio_buf[BUFFER_SIZE];
|
||||||
|
|
||||||
S9xFinalizeSamples();
|
|
||||||
size_t avail = S9xGetSampleCount();
|
size_t avail = S9xGetSampleCount();
|
||||||
while (avail >= BUFFER_SIZE)
|
while (avail >= BUFFER_SIZE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -288,8 +288,6 @@ void CXAudio2::ProcessSound()
|
||||||
S9xUpdateDynamicRate(freeBytes, sum_bufferSize);
|
S9xUpdateDynamicRate(freeBytes, sum_bufferSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
S9xFinalizeSamples();
|
|
||||||
|
|
||||||
UINT32 availableSamples;
|
UINT32 availableSamples;
|
||||||
|
|
||||||
availableSamples = S9xGetSampleCount();
|
availableSamples = S9xGetSampleCount();
|
||||||
|
|
|
@ -29,9 +29,10 @@ public:
|
||||||
// SetVolume should set a new volume level (between 0.0 and 1.0)
|
// SetVolume should set a new volume level (between 0.0 and 1.0)
|
||||||
virtual void SetVolume(double volume) = 0;
|
virtual void SetVolume(double volume) = 0;
|
||||||
|
|
||||||
// ProcessSound should call S9xFinalizeSamples and queue new available samples into the
|
// ProcessSound should queue new available samples into the Host sound
|
||||||
// Host sound system. If the sound system is callback based, ProcessSound should do a syncronized
|
// system. If the sound system is callback based, ProcessSound should move
|
||||||
// S9xFinalizeSamples and return.
|
// all samples into a buffer that the callback can read, using a critical
|
||||||
|
// section while accessing that buffer for thread-safety.
|
||||||
virtual void ProcessSound()=0;
|
virtual void ProcessSound()=0;
|
||||||
|
|
||||||
// GetDeviceList should return a list of device strings that can be displayed in a dropdown
|
// GetDeviceList should return a list of device strings that can be displayed in a dropdown
|
||||||
|
|
Loading…
Reference in New Issue