use static mutex member in RtAudioOutput class to serialize RtAudio calls across instances (#32)
This commit is contained in:
parent
6496f8e360
commit
e7caeb4d49
@ -50,7 +50,7 @@ private:
|
|||||||
uint32_t sampleRate_;
|
uint32_t sampleRate_;
|
||||||
SequentialBuffer audioBuffer_;
|
SequentialBuffer audioBuffer_;
|
||||||
std::unique_ptr<RtAudio> dac_;
|
std::unique_ptr<RtAudio> dac_;
|
||||||
std::mutex mutex_;
|
static std::mutex mutex_;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,8 @@ namespace openauto
|
|||||||
namespace projection
|
namespace projection
|
||||||
{
|
{
|
||||||
|
|
||||||
|
std::mutex RtAudioOutput::mutex_;
|
||||||
|
|
||||||
RtAudioOutput::RtAudioOutput(uint32_t channelCount, uint32_t sampleSize, uint32_t sampleRate)
|
RtAudioOutput::RtAudioOutput(uint32_t channelCount, uint32_t sampleSize, uint32_t sampleRate)
|
||||||
: channelCount_(channelCount)
|
: channelCount_(channelCount)
|
||||||
, sampleSize_(sampleSize)
|
, sampleSize_(sampleSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user