Removed GetAudioStreamBufferSizeDefault()
This commit is contained in:
parent
e00d2439b9
commit
6445200a93
1 changed files with 3 additions and 11 deletions
14
src/raudio.c
14
src/raudio.c
|
@ -412,7 +412,6 @@ void SetAudioBufferVolume(AudioBuffer *buffer, float volume);
|
||||||
void SetAudioBufferPitch(AudioBuffer *buffer, float pitch);
|
void SetAudioBufferPitch(AudioBuffer *buffer, float pitch);
|
||||||
void TrackAudioBuffer(AudioBuffer *buffer);
|
void TrackAudioBuffer(AudioBuffer *buffer);
|
||||||
void UntrackAudioBuffer(AudioBuffer *buffer);
|
void UntrackAudioBuffer(AudioBuffer *buffer);
|
||||||
int GetAudioStreamBufferSizeDefault();
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Functions Definition - Audio Device initialization and Closing
|
// Module Functions Definition - Audio Device initialization and Closing
|
||||||
|
@ -1785,7 +1784,9 @@ AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, un
|
||||||
|
|
||||||
// The size of a streaming buffer must be at least double the size of a period
|
// The size of a streaming buffer must be at least double the size of a period
|
||||||
unsigned int periodSize = AUDIO.System.device.playback.internalPeriodSizeInFrames;
|
unsigned int periodSize = AUDIO.System.device.playback.internalPeriodSizeInFrames;
|
||||||
unsigned int subBufferSize = GetAudioStreamBufferSizeDefault();
|
|
||||||
|
// If the buffer is not set, compute one that would give us a buffer good enough for a decent frame rate
|
||||||
|
unsigned int subBufferSize = (AUDIO.Buffer.defaultSize == 0)? AUDIO.Buffer.defaultSize : AUDIO.System.device.sampleRate/30;
|
||||||
|
|
||||||
if (subBufferSize < periodSize) subBufferSize = periodSize;
|
if (subBufferSize < periodSize) subBufferSize = periodSize;
|
||||||
|
|
||||||
|
@ -1920,15 +1921,6 @@ void SetAudioStreamBufferSizeDefault(int size)
|
||||||
AUDIO.Buffer.defaultSize = size;
|
AUDIO.Buffer.defaultSize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetAudioStreamBufferSizeDefault()
|
|
||||||
{
|
|
||||||
// if the buffer is not set, compute one that would give us a buffer good enough for a decent frame rate
|
|
||||||
if (AUDIO.Buffer.defaultSize == 0)
|
|
||||||
AUDIO.Buffer.defaultSize = AUDIO.System.device.sampleRate/30;
|
|
||||||
|
|
||||||
return AUDIO.Buffer.defaultSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module specific Functions Definition
|
// Module specific Functions Definition
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue