mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-19 18:03:56 +02:00
Lock mapped shared memory for audio buffers
This commit is contained in:
@@ -22,8 +22,9 @@ AudioShmBuffer::AudioShmBuffer(const Config& config)
|
|||||||
config.name.c_str(),
|
config.name.c_str(),
|
||||||
boost::interprocess::read_write) {
|
boost::interprocess::read_write) {
|
||||||
shm.truncate(config.size);
|
shm.truncate(config.size);
|
||||||
buffer = boost::interprocess::mapped_region(
|
buffer =
|
||||||
shm, boost::interprocess::read_write, 0, config.size);
|
boost::interprocess::mapped_region(shm, boost::interprocess::read_write,
|
||||||
|
0, config.size, nullptr, MAP_LOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioShmBuffer::~AudioShmBuffer() noexcept {
|
AudioShmBuffer::~AudioShmBuffer() noexcept {
|
||||||
|
|||||||
Reference in New Issue
Block a user