# Troubleshooting

Common issues and solutions for Audion.

## Quick Diagnostics

Before diving into specific issues, check these basics:

- ✅ Mac is connected to WiFi
- ✅ Audio device is connected and selected
- ✅ Streaming is enabled (green "Streaming" status)
- ✅ Listeners are on the same WiFi network
- ✅ Firewall isn't blocking port 8080

---

## Connection Issues

### Listeners Can't Access the URL

**Symptoms:**
- Browser shows "Can't connect to server"
- Page won't load
- Connection timeout

**Solutions:**

**1. Verify same WiFi network**
- Mac and listener devices must be on identical network
- Guest WiFi networks often isolate devices
- Try connecting listener device to main network

**2. Check firewall settings**
1. Open **System Settings** → **Network** → **Firewall**
2. If Firewall is on, click **Options**
3. Add Audion to allowed apps
4. Or temporarily disable firewall to test

**3. Confirm IP address**
- The IP shown in Audion may change if Mac reconnects
- Click out and back into app to refresh IP
- Generate new QR code if IP changed

**4. Test from Mac**
- Open browser on your Mac
- Visit `http://localhost:8080/listen`
- If this works, it's a network issue

### "Waiting for stream..." Message

**Symptoms:**
- Listener page loads
- But shows "Waiting for stream..." indefinitely
- Button to start listening doesn't appear

**Cause:** Streaming isn't enabled on the Mac

**Solution:**
1. Check Audion app on Mac
2. Status should show "Streaming" in green
3. If not, click "Start Streaming" button
4. Listener page will update automatically

### Connection Drops Frequently

**Symptoms:**
- "Connection lost" message appears
- Audio stops intermittently
- Must reconnect frequently

**Solutions:**

**1. WiFi signal strength**
- Move listeners closer to WiFi router
- Check for WiFi interference
- Consider upgrading router if old

**2. Network congestion**
- Too many devices on WiFi
- Reduce other network activity
- Upgrade internet plan if needed
- Use 5GHz WiFi if available

**3. Mac network stability**
- Keep Mac plugged into power
- Disable Mac sleep mode
- Use Ethernet instead of WiFi for Mac
- Check for macOS network issues

---

## Audio Issues

### No Audio on Level Meter

**Symptoms:**
- Level meter shows no activity
- Bars don't move
- Stream is "silent"

**Solutions:**

**1. Check device selection**
- Verify correct audio input is selected
- Try selecting a different device
- Refresh device list

**2. Verify audio source**
- Confirm audio is actually playing
- Check soundboard output levels
- Test with built-in mic by speaking

**3. Check connections**
- Verify cables are plugged in
- Check USB audio interface is powered
- Try different USB port
- Restart audio interface

**4. Audio MIDI Setup check**
1. Open **Audio MIDI Setup** (Applications → Utilities)
2. Find your audio device
3. Verify it's not muted
4. Check sample rate is 44.1kHz or 48kHz
5. Verify input is active

**5. Restart Audion**
- Quit Audion completely
- Disconnect/reconnect audio device
- Relaunch Audion

### Audio Too Quiet

**Symptoms:**
- Listeners report low volume
- Level meter barely moves
- Must turn device volume to maximum

**Solutions:**

**1. Enable Auto Gain**
- Check the "Auto Gain" box
- Let it analyze audio for a few moments
- Should automatically increase volume

**2. Increase source levels**
- Turn up soundboard output
- Increase aux send level
- Boost gain on audio interface

**3. Check listener device**
- Verify listener volume is up
- Check device isn't on "vibrate only"
- Try different headphones

### Audio Too Loud / Distorted

**Symptoms:**
- Crackling or buzzing
- Audio sounds harsh
- Level meter frequently in red

**Solutions:**

**1. Reduce source levels**
- Lower soundboard output
- Decrease aux send level
- Reduce gain on audio interface

**2. Disable Auto Gain**
- If Auto Gain is overcompensating
- Uncheck "Auto Gain" box
- Control levels manually

**3. Check for clipping**
- Level meter should stay in green
- Occasional yellow is okay
- Red means too loud

### Audio Delay / Latency

**Symptoms:**
- Noticeable delay between live and stream
- Audio lags behind video (if video present)

**Context:** Some latency (80-150ms) is normal and expected

**Solutions:**

**1. WiFi optimization**
- Use 5GHz WiFi instead of 2.4GHz
- Reduce distance to router
- Minimize WiFi interference

**2. Network prioritization**
- Use QoS on router if available
- Prioritize Mac's traffic
- Reduce other network usage

**3. Device performance**
- Close other apps on listener devices
- Restart listener devices if slow
- Use newer devices if available

**Note:** Latency under 200ms is generally not noticeable for listening purposes.

### Audio Cutting Out

**Symptoms:**
- Audio stops and starts
- Choppy playback
- Stuttering sound

**Solutions:**

**1. WiFi signal**
- Move listener closer to router
- Check for interference (microwaves, etc.)
- Use 5GHz band if available

**2. Mac performance**
- Close unnecessary apps
- Check Activity Monitor for high CPU
- Ensure Mac isn't overheating

**3. Audio buffer**
- In extreme cases, restart Audion
- This resets audio buffers
- Should resolve temporary glitches

---

## MIDI Issues

### MIDI Device Not Showing Up

**Solutions:**

**1. Check connection**
- Ensure device is powered on
- Try different USB port
- Check USB cable

**2. Restart scan**
- Disable MIDI in preferences
- Re-enable MIDI
- Device should appear

**3. Audio MIDI Setup**
1. Open **Audio MIDI Setup**
2. Window → Show MIDI Studio
3. Check if device appears
4. If not, it's a driver/connection issue

**4. Bluetooth MIDI**
1. Open Audio MIDI Setup
2. Window → Show MIDI Studio  
3. Click Bluetooth icon
4. Pair your device

### MIDI Commands Not Working

**Solutions:**

**1. Verify MIDI enabled**
- Check "Enable MIDI control" is checked
- Device is selected
- Preferences saved

**2. Re-learn commands**
- Click "Clear" on non-working command
- Click "Learn" again
- Send MIDI message from device

**3. Test MIDI signal**
- Download MIDI Monitor app
- Verify device is sending MIDI
- Check channel and CC numbers match

**4. Check device settings**
- Verify device is sending correct messages
- Check MIDI channel settings
- Confirm CC numbers are as expected

---

## macOS-Specific Issues

### Permission Errors

**Symptoms:**
- "Access denied" messages
- Can't access audio device

**Solutions:**

**1. Microphone permission**
1. System Settings → Privacy & Security → Microphone
2. Enable Audion
3. Restart Audion

**2. Network permission**
1. System Settings → Privacy & Security → Local Network
2. Enable Audion
3. Restart Audion

### App Won't Launch

**Solutions:**

**1. Gatekeeper issue**
- Right-click Audion in Applications
- Select "Open"
- Click "Open" in dialog
- Only needed first time

**2. Quarantine issue**
- Open Terminal
- Type: `xattr -cr /Applications/Audion.app`
- Press Enter
- Try launching again

**3. Corrupted download**
- Delete Audion from Applications
- Empty Trash
- Re-download and reinstall

### Mac Goes to Sleep

**Problem:** Stream stops when Mac sleeps

**Solutions:**

**1. Prevent display sleep**
1. System Settings → Lock Screen
2. Set "Turn display off" to "Never" (when plugged in)

**2. Prevent system sleep**
1. System Settings → Battery (or Energy Saver)
2. Check "Prevent automatic sleeping when display is off"

**3. Use Amphetamine**
- Free app from Mac App Store
- Keeps Mac awake during services
- Highly recommended

---

## Mobile Device Issues

### iOS Audio Stops on Screen Lock

**Problem:** Audio pauses when iPhone locks

**Cause:** iOS limitation - Safari pauses media when locked

**Solutions:**

**1. Keep screen on**
- Adjust Auto-Lock: Settings → Display & Brightness → Auto-Lock
- Set to "Never" temporarily
- Remember to change back after service

**2. Reduce brightness**
- Keep screen on but dim
- Saves battery while allowing audio

**3. Keep device plugged in**
- Connect to charger
- Allows longer listening without battery drain

### Android Audio Issues

**Solutions:**

**1. Battery optimization**
- Disable battery optimization for browser
- Settings → Battery → Battery Optimization
- Ensure Chrome/browser isn't optimized

**2. Chrome issues**
- Try Firefox or Edge instead
- Update Chrome to latest version
- Clear Chrome cache

### Device Overheating

**Problem:** Phone gets hot during long services

**Solutions:**

**1. Reduce screen brightness**
- Lower brightness significantly
- Still keeps screen on

**2. Close other apps**
- Close all background apps
- Reduces processing load

**3. Remove case**
- Better heat dissipation
- Only during service

---

## QR Code Issues

### QR Code Won't Scan

**Solutions:**

**1. Camera focus**
- Ensure QR code is in focus
- Try different distance
- Adequate lighting needed

**2. QR code quality**
- Regenerate at higher quality
- Ensure print isn't pixelated
- Use PNG format for printing

**3. Device camera**
- Update iOS/Android
- Try different scanning app
- Verify camera works generally

### Wrong URL in QR Code

**Problem:** Old IP address in generated code

**Solution:**
- Generate new QR code
- IP addresses change when network changes
- Always regenerate after network changes

---

## Performance Issues

### High CPU Usage

**Check:**
1. Open Activity Monitor
2. Find Audion process
3. Check CPU percentage

**Solutions:**

**1. If very high (>50%)**
- Quit and restart Audion
- Disconnect/reconnect audio device
- Check for macOS updates

**2. Close other apps**
- Free up system resources
- Especially audio apps
- Browser tabs can consume CPU

### Memory Issues

**Solutions:**

**1. Restart Audion**
- Quit completely
- Relaunch
- Memory leaks are cleared

**2. Restart Mac**
- If Audion has been running for days
- Clears system memory
- Resolves various issues

---

## When All Else Fails

### Complete Reset

**1. Reset preferences**
- Quit Audion
- Delete: `~/Library/Preferences/com.yourcompany.Audion.plist`
- Restart Audion
- Reconfigure from scratch

**2. Reinstall Audion**
- Delete from Applications
- Empty Trash
- Download fresh copy
- Reinstall

### Getting Help

**Before contacting support, gather:**
- macOS version
- Audion version  
- Audio device make/model
- Description of issue
- Steps to reproduce
- Any error messages

**Contact:**
📧 Email: [me@josiaho.com](mailto:me@josiaho.com?subject=Re:Audion)

**Include:**
- All gathered information above
- Screenshots if applicable
- What you've tried already

---

## Preventive Measures

**To avoid issues:**

✅ Test your setup before services  
✅ Keep Audion updated  
✅ Use reliable WiFi network  
✅ Have backup plan ready  
✅ Train multiple people on system  
✅ Keep Mac plugged in  
✅ Prevent Mac sleep during services  
✅ Monitor active listener count  
✅ Have tech support contact ready

---

Need more help? Check out our [FAQ](faq.md) or contact [support](mailto:me@josiaho.com?subject=Re:Audion).
