# Élément audio

## 1. Structure

```ts
interface AudioClip extends BaseClip {
  type: "audio";
  src: string | { $ref: string };
  source?: MediaSource;
  volume?: number;
  loop?: boolean;
  playbackRate?: number;
  fadeIn?: number;
  fadeOut?: number;
}
```

## 2. Champs pris en charge

### `src`
- Type : `string | { $ref: string }`
- Requis : oui

### `source.start`
- Type : `number`
- Requis : non
- Unité : secondes

### `source.end`
- Type : `number`
- Requis : non
- Unité : secondes

### `volume`
- Type : `number`
- Requis : non
- Valeur par défaut : `1`

### `loop`
- Type : `boolean`
- Requis : non
- Valeur par défaut : `false`

### `playbackRate`
- Type : `number`
- Requis : non
- Valeur par défaut : `1`

### `fadeIn`
- Type : `number`
- Requis : non
- Unité : secondes

### `fadeOut`
- Type : `number`
- Requis : non
- Unité : secondes

## 3. Comportement actuel du runtime

- `source.start` fonctionne
- `source.end` fonctionne
- `fadeIn` et `fadeOut` fonctionnent
- `loop` fonctionne
- La `transition` visuelle ne s'applique pas aux clips audio

## 4. Exemple

```json
{
  "type": "audio",
  "start": 0,
  "duration": 10,
  "src": { "$ref": "bgm-main" },
  "volume": 0.6,
  "fadeIn": 1.2,
  "fadeOut": 1.5,
  "loop": true
}
```