Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/afkcodes/react-native-audio-pro/llms.txt

Use this file to discover all available pages before exploring further.

EQUALIZER_BANDS, EQUALIZER_PRESETS, and EQUALIZER_ADVANCED_PRESETS are exported constants designed for use with AudioPro.setEqualizer(). They give you everything you need to build an equalizer UI or apply a ready-made sound profile without hardcoding any frequency or gain data yourself. The equalizer is supported on Android only — on iOS these constants are still importable but setEqualizer() is a no-op.
import {
  EQUALIZER_BANDS,
  EQUALIZER_PRESETS,
  EQUALIZER_ADVANCED_PRESETS,
} from 'react-native-audio-pro';

EQUALIZER_BANDS

Type: AudioProEqualizerBand[] A fixed array of 10 frequency bands covering the full audible spectrum from 31 Hz to 16 kHz. Each band corresponds to one gain value in every preset’s gains array — index 0 is 31 Hz, index 9 is 16 kHz.
const EQUALIZER_BANDS = [
  { frequency: 31,    label: '31Hz'  },
  { frequency: 63,    label: '63Hz'  },
  { frequency: 125,   label: '125Hz' },
  { frequency: 250,   label: '250Hz' },
  { frequency: 500,   label: '500Hz' },
  { frequency: 1000,  label: '1kHz'  },
  { frequency: 2000,  label: '2kHz'  },
  { frequency: 4000,  label: '4kHz'  },
  { frequency: 8000,  label: '8kHz'  },
  { frequency: 16000, label: '16kHz' },
];
IndexFrequencyLabel
031 Hz31Hz
163 Hz63Hz
2125 Hz125Hz
3250 Hz250Hz
4500 Hz500Hz
51000 Hz1kHz
62000 Hz2kHz
74000 Hz4kHz
88000 Hz8kHz
916000 Hz16kHz

Usage — building a slider UI

Iterate over EQUALIZER_BANDS to render one slider per band. Pair each slider value with the corresponding index in your gains array, then call AudioPro.setEqualizer() whenever a value changes.
import { AudioPro, EQUALIZER_BANDS } from 'react-native-audio-pro';
import { View, Text } from 'react-native';
import Slider from '@react-native-community/slider';

function EqualizerUI() {
  const [gains, setGains] = React.useState<number[]>(
    new Array(EQUALIZER_BANDS.length).fill(0)
  );

  const handleGainChange = (index: number, value: number) => {
    const next = [...gains];
    next[index] = value;
    setGains(next);
    AudioPro.setEqualizer(next);
  };

  return (
    <View>
      {EQUALIZER_BANDS.map((band, index) => (
        <View key={band.label}>
          <Text>{band.label}</Text>
          <Slider
            minimumValue={-12}
            maximumValue={12}
            value={gains[index]}
            onValueChange={(v) => handleGainChange(index, v)}
          />
        </View>
      ))}
    </View>
  );
}

EQUALIZER_PRESETS

Type: AudioProEqualizerPreset[] Nineteen classic equalizer presets modelled after the presets found in popular media players. Each preset contains a name, a stable id, and a gains array of 10 dB values aligned to EQUALIZER_BANDS.
Most presets in this set do not include a description. Use EQUALIZER_ADVANCED_PRESETS if you need descriptive text for every preset.

Preset catalogue

NameID
Defaultdefault
Clubclub
Livelive
PartyParty
Poppop
Softsoft
Skaska
Reggaereggae
Rockrock
Dancedance
Technotechno
Headphonesheadphones
Soft rocksoft_rock
Classicalclassical
Large Halllarge_hall
Full Bassfull_base
Full Treblefull_treble
Laptop Speakerslaptop_speakers
Full Bass & Treblebass_treble

Usage — look up a preset by ID and apply it

import { AudioPro, EQUALIZER_PRESETS } from 'react-native-audio-pro';

function applyPreset(id: string) {
  const preset = EQUALIZER_PRESETS.find((p) => p.id === id);
  if (!preset) return;

  AudioPro.setEqualizer(preset.gains);
  console.log(`Applied preset: ${preset.name}`);
}

// Apply the Rock preset
applyPreset('rock');

Usage — render a preset picker

import { AudioPro, EQUALIZER_PRESETS } from 'react-native-audio-pro';
import { View, Text, TouchableOpacity } from 'react-native';

function PresetPicker() {
  const [activeId, setActiveId] = React.useState('default');

  const select = (id: string, gains: number[]) => {
    setActiveId(id);
    AudioPro.setEqualizer(gains);
  };

  return (
    <View>
      {EQUALIZER_PRESETS.map((preset) => (
        <TouchableOpacity
          key={preset.id}
          onPress={() => select(preset.id, preset.gains)}
        >
          <Text>{preset.name}</Text>
        </TouchableOpacity>
      ))}
    </View>
  );
}

EQUALIZER_ADVANCED_PRESETS

Type: AudioProEqualizerPreset[] Twenty-six carefully tuned presets with extended descriptions. Every preset in this set includes a description field explaining its sonic character and intended use case. Advanced preset IDs are prefixed with adv- to avoid collisions with EQUALIZER_PRESETS.
Use EQUALIZER_ADVANCED_PRESETS when you want to show descriptive text alongside each preset, or when you need presets tuned for specific playback scenarios such as speech, late-night listening, or specific headphone types.

Preset catalogue

NameIDDescription
Flatadv-flatNeutral sound with no frequency adjustments.
Rockadv-rockEnhanced drums and guitars with clear highs.
Popadv-popVibrant and punchy sound with enhanced vocals.
Jazzadv-jazzRich and warm tone emphasising acoustic instruments.
Classicaladv-classicalWide dynamic range with clear highs and controlled mids.
Hip-Hopadv-hip-hopDeep bass with crisp highs for impact.
Electronicadv-electronicEnhanced low-end and sparkling highs.
Bass Boostadv-bass-boostStrong low-frequency enhancement for bass impact.
Vocal Clarityadv-vocal-clarityEnhanced mid-range for crystal clear vocals.
Treble Boostadv-treble-boostBrightened highs for detail and air.
Studio Monitoradv-studio-monitorProfessional reference tuning for accurate monitoring.
Audiophileadv-audiophileRefined and balanced sound for critical listening.
Headphonesadv-headphonesOptimised for over-ear and on-ear headphones.
Earbudsadv-earbudsTuned for in-ear monitors and earbuds.
Speakersadv-speakersBalanced for desktop and bookshelf speakers.
Live Concertadv-live-concertRecreates live venue atmosphere with enhanced presence.
Midnight Modeadv-midnight-modeCompressed dynamic range for late-night listening.
Workoutadv-workoutEnergetic and motivating sound with punchy bass.
Warm Analogadv-warm-analogRich vintage warmth with analog character.
Crystal Clearadv-crystal-clearEnhanced highs with exceptional detail.
Rich & Fulladv-rich-fullFull-bodied sound with rich harmonics.
Atmosphericadv-atmosphericSpacious and airy soundscape.
Vibrant Popadv-vibrant-popColourful and exciting sound with enhanced energy.
Deep Impactadv-deep-impactStrong low-end extension with controlled power.
Silk Smoothadv-silk-smoothUltra-smooth and refined sound.
Presence Boostadv-presence-boostForward and intimate sound with enhanced presence.

Usage — apply the Vocal Clarity preset for podcasts and speech

The adv-vocal-clarity preset boosts the mid-range where human speech sits, making it ideal for podcasts, audiobooks, and any vocal-focused content. Pair it with AudioProContentType.SPEECH in your configuration for best results.
import {
  AudioPro,
  EQUALIZER_ADVANCED_PRESETS,
  AudioProContentType,
} from 'react-native-audio-pro';

// Configure the player for speech content
AudioPro.configure({
  contentType: AudioProContentType.SPEECH,
  progressIntervalMs: 5000,
});

// Apply the Vocal Clarity preset
const vocalClarity = EQUALIZER_ADVANCED_PRESETS.find(
  (p) => p.id === 'adv-vocal-clarity'
);

if (vocalClarity) {
  AudioPro.setEqualizer(vocalClarity.gains);
  console.log(vocalClarity.description);
  // → "Enhanced mid-range for crystal clear vocals.
  //    Perfect for podcasts, audiobooks, and vocal-focused music."
}

Usage — display advanced presets with descriptions

import { AudioPro, EQUALIZER_ADVANCED_PRESETS } from 'react-native-audio-pro';
import { View, Text, TouchableOpacity } from 'react-native';

function AdvancedPresetPicker() {
  const [activeId, setActiveId] = React.useState('adv-flat');

  const select = (id: string, gains: number[]) => {
    setActiveId(id);
    AudioPro.setEqualizer(gains);
  };

  return (
    <View>
      {EQUALIZER_ADVANCED_PRESETS.map((preset) => (
        <TouchableOpacity
          key={preset.id}
          onPress={() => select(preset.id, preset.gains)}
        >
          <Text>{preset.name}</Text>
          {preset.description && (
            <Text>{preset.description}</Text>
          )}
        </TouchableOpacity>
      ))}
    </View>
  );
}
The equalizer is an Android-only feature. On iOS, AudioPro.setEqualizer() is a no-op. Gate your equalizer UI behind a platform check using Platform.OS === 'android' if you want to hide it on iOS.

Build docs developers (and LLMs) love