diff options
author | Robin Gareus <robin@gareus.org> | 2015-07-01 01:18:52 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-07-01 01:18:52 +0200 |
commit | da0ca575390ff2af6868bc7b9c175c8e3ebe8e03 (patch) | |
tree | e45d9578285d3435da7442408a0389716b2ea476 | |
parent | b86cf68e1ffd7a3e584f10dba669729b84036c4a (diff) |
NOOP, reindent & whitespace
-rw-r--r-- | libs/backends/coreaudio/coreaudio_backend.cc | 10 | ||||
-rw-r--r-- | libs/backends/coreaudio/coreaudio_backend.h | 88 |
2 files changed, 49 insertions, 49 deletions
diff --git a/libs/backends/coreaudio/coreaudio_backend.cc b/libs/backends/coreaudio/coreaudio_backend.cc index c9a3db0567..f074ad4c3c 100644 --- a/libs/backends/coreaudio/coreaudio_backend.cc +++ b/libs/backends/coreaudio/coreaudio_backend.cc @@ -1586,8 +1586,8 @@ CoreAudioBackend::midi_process_byte (const uint8_t byte) midi_record_byte (byte); return midi_prepare_buffered_event (); } - _total_bytes = 0; - _unbuffered_bytes = 0; + _total_bytes = 0; + _unbuffered_bytes = 0; _expected_bytes = 0; _status_byte = 0; return false; @@ -1636,13 +1636,13 @@ CoreAudioBackend::midi_process_byte (const uint8_t byte) return false; case 0xf6: // Tune Request - midi_prepare_byte_event(byte); + midi_prepare_byte_event (byte); _expected_bytes = 0; _status_byte = 0; return true; } } - midi_record_byte(byte); + midi_record_byte (byte); return false; } // Data byte @@ -1653,7 +1653,7 @@ CoreAudioBackend::midi_process_byte (const uint8_t byte) return false; } if (! _total_bytes) { - midi_record_byte(_status_byte); + midi_record_byte (_status_byte); } midi_record_byte(byte); return (_total_bytes == _expected_bytes) ? midi_prepare_buffered_event() : false; diff --git a/libs/backends/coreaudio/coreaudio_backend.h b/libs/backends/coreaudio/coreaudio_backend.h index caf8edafba..4f4e844442 100644 --- a/libs/backends/coreaudio/coreaudio_backend.h +++ b/libs/backends/coreaudio/coreaudio_backend.h @@ -449,55 +449,55 @@ class CoreAudioBackend : public AudioBackend { #ifdef USE_MIDI_PARSER - bool midi_process_byte (const uint8_t); + bool midi_process_byte (const uint8_t); - void midi_record_byte(uint8_t byte) { - if (_total_bytes < sizeof(_parser_buffer)) { - _parser_buffer[_total_bytes] = byte; - } else { - ++_unbuffered_bytes; - } - ++_total_bytes; - } - - void midi_prepare_byte_event(const uint8_t byte) { - _parser_buffer[0] = byte; - _event.prepare(1); - } - - bool midi_prepare_buffered_event() { - const bool result = _unbuffered_bytes == 0; - if (result) { - _event.prepare(_total_bytes); + void midi_record_byte (uint8_t byte) { + if (_total_bytes < sizeof (_parser_buffer)) { + _parser_buffer[_total_bytes] = byte; + } else { + ++_unbuffered_bytes; + } + ++_total_bytes; } - _total_bytes = 0; - _unbuffered_bytes = 0; - if (_status_byte >= 0xf0) { - _expected_bytes = 0; - _status_byte = 0; + + void midi_prepare_byte_event (const uint8_t byte) { + _parser_buffer[0] = byte; + _event.prepare(1); } - return result; - } - struct ParserEvent { - size_t _size; - bool _pending; - ParserEvent (const size_t size) - : _size(size) - , _pending(false) {} - - void prepare(const size_t size) { - _size = size; - _pending = true; + bool midi_prepare_buffered_event () { + const bool result = _unbuffered_bytes == 0; + if (result) { + _event.prepare (_total_bytes); + } + _total_bytes = 0; + _unbuffered_bytes = 0; + if (_status_byte >= 0xf0) { + _expected_bytes = 0; + _status_byte = 0; + } + return result; } - } _event; - - bool _first_time; - size_t _unbuffered_bytes; - size_t _total_bytes; - size_t _expected_bytes; - uint8_t _status_byte; - uint8_t _parser_buffer[1024]; + + struct ParserEvent { + size_t _size; + bool _pending; + ParserEvent (const size_t size) + : _size(size) + , _pending(false) {} + + void prepare (const size_t size) { + _size = size; + _pending = true; + } + } _event; + + bool _first_time; + size_t _unbuffered_bytes; + size_t _total_bytes; + size_t _expected_bytes; + uint8_t _status_byte; + uint8_t _parser_buffer[1024]; #endif }; // class CoreAudioBackend |