mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
ALSA Backend: align midi output buffer with n_periods (currently 2)
This commit is contained in:
parent
eb289a76af
commit
b3a44ea32b
2 changed files with 23 additions and 11 deletions
|
|
@ -141,10 +141,13 @@ class AlsaMidiPort : public AlsaPort {
|
|||
DataType type () const { return DataType::MIDI; };
|
||||
|
||||
void* get_buffer (pframes_t nframes);
|
||||
const AlsaMidiBuffer const_buffer () const { return _buffer; }
|
||||
const AlsaMidiBuffer const_buffer () const { return _buffer[_bufperiod]; }
|
||||
|
||||
void next_period() { get_buffer(0); _bufperiod = (_bufperiod + 1) % 2; }
|
||||
|
||||
private:
|
||||
AlsaMidiBuffer _buffer;
|
||||
AlsaMidiBuffer _buffer[2];
|
||||
int _bufperiod;
|
||||
}; // class AlsaMidiPort
|
||||
|
||||
class AlsaAudioBackend : public AudioBackend {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue