mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: implement Bluetooth MIDI nodes
Implement BLE MIDI node, providing an input and output port. MIDI data received is normalized and produced on output port. Data from input port is converted to BLE MIDI and sent to the device. Event timestamps come from device clock, whose offset to wall clock we determine by correlating packet reception times with their timestamps. The jitter in packet reception is likely much larger than device clock error, so we average over that.
This commit is contained in:
		
							parent
							
								
									fe3ca50818
								
							
						
					
					
						commit
						fe11bfdba0
					
				
					 3 changed files with 1912 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -33,6 +33,7 @@ bluez5_sources = [
 | 
			
		|||
  'dbus-monitor.c',
 | 
			
		||||
  'midi-enum.c',
 | 
			
		||||
  'midi-parser.c',
 | 
			
		||||
  'midi-node.c',
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
bluez5_data = ['bluez-hardware.conf']
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1907
									
								
								spa/plugins/bluez5/midi-node.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1907
									
								
								spa/plugins/bluez5/midi-node.c
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -36,6 +36,7 @@ extern const struct spa_handle_factory spa_sco_source_factory;
 | 
			
		|||
extern const struct spa_handle_factory spa_a2dp_sink_factory;
 | 
			
		||||
extern const struct spa_handle_factory spa_a2dp_source_factory;
 | 
			
		||||
extern const struct spa_handle_factory spa_bluez5_midi_enum_factory;
 | 
			
		||||
extern const struct spa_handle_factory spa_bluez5_midi_node_factory;
 | 
			
		||||
 | 
			
		||||
SPA_EXPORT
 | 
			
		||||
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
 | 
			
		||||
| 
						 | 
				
			
			@ -71,6 +72,9 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
 | 
			
		|||
	case 8:
 | 
			
		||||
		*factory = &spa_bluez5_midi_enum_factory;
 | 
			
		||||
		break;
 | 
			
		||||
	case 9:
 | 
			
		||||
		*factory = &spa_bluez5_midi_node_factory;
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue