4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
7 |
* Copyright (C) 2009 - 2011 Christian Schoenebeck and Grigor Iliev * |
* Copyright (C) 2009 - 2012 Christian Schoenebeck and Grigor Iliev * |
8 |
|
* Copyright (C) 2013 - 2014 Christian Schoenebeck and Andreas Persson * |
9 |
* * |
* * |
10 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
11 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
504 |
} |
} |
505 |
|
|
506 |
// perform MIDI program change commands |
// perform MIDI program change commands |
507 |
while (ProgramChangeQueue.read_space() > 0) { |
if (ProgramChangeQueue.read_space() > 0) { |
508 |
program_change_command_t cmd; |
program_change_command_t cmd; |
509 |
ProgramChangeQueue.pop(&cmd); |
// skip all old ones, only process the latest one |
510 |
|
do { |
511 |
|
ProgramChangeQueue.pop(&cmd); |
512 |
|
} while (ProgramChangeQueue.read_space() > 0); |
513 |
cmd.pEngineChannel->ExecuteProgramChange(cmd.Program); |
cmd.pEngineChannel->ExecuteProgramChange(cmd.Program); |
514 |
} |
} |
515 |
|
|
516 |
RefillStreams(); // refill the most empty streams |
RefillStreams(); // refill the most empty streams |
517 |
|
|
518 |
// if nothing was done during this iteration (eg no streambuffer |
// if nothing was done during this iteration (eg no streambuffer |