diff options
| author | raysan5 <[email protected]> | 2021-06-05 12:32:52 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2021-06-05 12:32:52 +0200 |
| commit | 6445200a93354825daae733e3172a330c4ee2110 (patch) | |
| tree | f305a366801a2c031d315ff8d7b64f430d7cbf7d /src | |
| parent | e00d2439b98f969c84cb4b75e2719e6ca21d9dc3 (diff) | |
| download | raylib-6445200a93354825daae733e3172a330c4ee2110.tar.gz raylib-6445200a93354825daae733e3172a330c4ee2110.zip | |
Removed GetAudioStreamBufferSizeDefault()
Diffstat (limited to 'src')
| -rw-r--r-- | src/raudio.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/raudio.c b/src/raudio.c index 8895513e..3c2379a2 100644 --- a/src/raudio.c +++ b/src/raudio.c @@ -412,7 +412,6 @@ void SetAudioBufferVolume(AudioBuffer *buffer, float volume); void SetAudioBufferPitch(AudioBuffer *buffer, float pitch); void TrackAudioBuffer(AudioBuffer *buffer); void UntrackAudioBuffer(AudioBuffer *buffer); -int GetAudioStreamBufferSizeDefault(); //---------------------------------------------------------------------------------- // 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 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; @@ -1920,15 +1921,6 @@ void SetAudioStreamBufferSizeDefault(int 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 //---------------------------------------------------------------------------------- |
