compute correct size for working buffers used by compound regions during disk refills
This commit is contained in:
parent
b53d80a7d4
commit
7d71729237
@ -50,6 +50,7 @@
|
||||
#include <glibmm/miscutils.h>
|
||||
|
||||
#include "pbd/file_utils.h"
|
||||
#include "pbd/playback_buffer.h"
|
||||
#include "pbd/scoped_file_descriptor.h"
|
||||
#include "pbd/xml++.h"
|
||||
|
||||
@ -1117,7 +1118,7 @@ AudioSource::ensure_buffers_for_level (uint32_t level, samplecnt_t sample_rate)
|
||||
void
|
||||
AudioSource::ensure_buffers_for_level_locked (uint32_t level, samplecnt_t sample_rate)
|
||||
{
|
||||
samplecnt_t nframes = (samplecnt_t) floor (Config->get_audio_playback_buffer_seconds() * sample_rate);
|
||||
samplecnt_t nframes = PlaybackBuffer<Sample>::power_of_two_size ((samplecnt_t) floor (Config->get_audio_playback_buffer_seconds() * sample_rate));
|
||||
|
||||
/* this may be called because either "level" or "sample_rate" have
|
||||
* changed. and it may be called with "level" smaller than the current
|
||||
|
Loading…
Reference in New Issue
Block a user