# StartAttachment

Starts an attachment.

### Synopsis

`Err StartAttachment (Item Attachment, TagArg *tagList)
Err StartAttachmentVA (Item Attachment, uint32 tag1, ...)`

### Description

This function starts playback of an attachment, which may be an attached envelope or sample. This function is useful to start attachments that aren't started by `StartInstrument()` (e.g. attachments with the AF_ATTF_NOAUTOSTART flag set).

An attachment started with `StartAttachment()` should be released with `ReleaseAttachment()` and stopped with `StopAttachment()` if necessary.

### Arguments

Attachment
  The item number for the attachment.

### Tags

None

### Return Value

The function returns a non-negative value if successful or an error code (a negative value) if an error occurs.

### Implementation

SWI implemented in Audio folio V20.

### Associated Files

audio.h

### Caveats

Prior to V24, `StartAttachment()` did not support envelope attachments.

### See Also

`ReleaseAttachment``(),` StopAttachment`(),` LinkAttachments`(),` AttachSample`(),` AttachEnvelope`()`