---
title: "MIDIEntityGetSource(_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/midientitygetsource(_:_:)"
---

# MIDIEntityGetSource(_:_:)

Returns one of an entity’s sources.

## Declaration

```swift
func MIDIEntityGetSource(_ entity: MIDIEntityRef, _ sourceIndex0: Int) -> MIDIEndpointRef
```

## Parameters

- `entity`: The entity to query.
- `sourceIndex0`: The source index.

## Return Value

Return Value A reference to a source, or NULL if an error occurred.

## See Also

### Entity lookup

- [MIDIEntityGetDevice(_:_:)](coremidi/midientitygetdevice(_:_:).md)
- [MIDIEntityGetNumberOfSources(_:)](coremidi/midientitygetnumberofsources(_:).md)
- [MIDIEntityGetNumberOfDestinations(_:)](coremidi/midientitygetnumberofdestinations(_:).md)
- [MIDIEntityGetDestination(_:_:)](coremidi/midientitygetdestination(_:_:).md)
- [MIDIEntityRef](coremidi/midientityref.md)
