> ## Documentation Index
> Fetch the complete documentation index at: https://hedgeem-api.qeetoto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# F046 — Deal Sound Effects (Per-Card dealing_cards SFX)

> A dealing_cards sound effect fires for each hole card as it launches from the shuffler, synced to the fly animation

# F046 — Deal Sound Effects

| Field  | Value               |
| ------ | ------------------- |
| ID     | F046                |
| Phase  | 3 — UI              |
| Jira   | HEDGE-174           |
| Status | TS ✅ · JS ⬜ · UMA ✅ |

## Business Rule

When hole cards are dealt (HOLE stage), a `dealing_cards` sound effect plays **once per card** as each card launches from the shuffler. The sound is tightly synced to the card's visual departure — it fires at the same moment the card becomes visible and begins its flight path.

Community card advances (FLOP/TURN/RIVER) play a single `dealing_cards` sound at stage transition, plus a `card_flip` sound for each individual card that flips face-up.

## Sound Keys

| Key             | Trigger                           | Timing                     |
| --------------- | --------------------------------- | -------------------------- |
| `dealing_cards` | Each hole card launched from shoe | Per-card, at launch moment |
| `dealing_cards` | FLOP/TURN/RIVER advance           | Once per stage advance     |
| `card_flip`     | Community card flips face-up      | Per-card reveal            |

## V5 Implementation

**File:** `source/client_source/src/js/Game/gameTypes/cardDesktop.js` — `_launchCard()` (line 51)

```javascript theme={null}
_launchCard() {
  GAMEVIEW.soundController.playSoundFX('dealing_cards');  // fires per card
  // ... tween animation starts
}
```

The card's stagger delay ensures each `dealing_cards` play is separated by \~300ms (= `CARD_FLY_STEP`), giving a rhythmic tap-tap-tap as cards fly out.

## V6 Implementation

Sound is fired inside the `delayedCall` callback in `_renderCards()`, at the same moment the card is positioned at the shoe and the tween begins:

```typescript theme={null}
this.time.delayedCall((c + 1) * CARD_FLY_STEP, () => {
  this._sfx('dealing_cards');  // per-card — HEDGE-174
  sprite.setPosition(SHOE_X, SHOE_Y).setAngle(SHOE_ANGLE).setVisible(true);
  this.tweens.add({ ... });
});
```

`_sfx()` respects the `cfgSfx` toggle and `soundLevel` mute state, so the sound is suppressed when the player has muted audio.

## Sound Asset

| Platform         | File                               |
| ---------------- | ---------------------------------- |
| Desktop primary  | `sounds/desktop/dealing_cards.m4a` |
| Desktop fallback | `sounds/desktop/dealing_cards.mp3` |
| Mobile           | `sounds/mobile/dealing_cards.m4a`  |

The v6 client loads the sound file via `PreloadScene` under the key `dealing_cards`.

## Acceptance Criteria

| ID         | Criterion                                                                                |
| ---------- | ---------------------------------------------------------------------------------------- |
| AC-F046-01 | On HOLE stage deal, `dealing_cards` plays exactly once per hole card (3 hands = 6 plays) |
| AC-F046-02 | Each play is separated by \~300ms, synced to card launch timing                          |
| AC-F046-03 | Sound does NOT play when SFX is muted (`soundLevel = 0` or `cfgSfx = false`)             |
| AC-F046-04 | FLOP/TURN/RIVER advances still play one `dealing_cards` sound per stage                  |
| AC-F046-05 | Community card flips still play `card_flip` per revealed card                            |

## Version Parity

| Version         | Status            | Notes                                        |
| --------------- | ----------------- | -------------------------------------------- |
| JS (v4)         | ⬜ Not yet audited | Likely same pattern                          |
| TypeScript (v6) | ✅ Implemented     | Per-card sfx in `delayedCall`, commit `HEAD` |
| UMA (v5)        | ✅ Implemented     | `_launchCard()` line 51                      |
