# Audio Calc: Buffer Size to Latency Converter

> Audio Calc: Buffer Size to Latency Converter is a paid API for AI agents from audio-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Converts audio buffer size (in samples) to one-way and round-trip latency in milliseconds at a given sample rate, or finds the buffer size needed to meet a latency target.

## Facts

- Endpoint: GET https://audio-calc.x402tookit.com/buffer-latency?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/audio-calc-buffer-size-to-latency-converter-7d04dc47
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wNc2_DEdN4brb-7eJe-TX

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability audio-calc-buffer-size-to-latency-converter-7d04dc47
```

Example prompt: What's the one-way and round-trip latency for a 256-sample buffer at 48000 Hz, assuming 2 buffers in the path?

## When to prefer this

Use this endpoint when you need to compute audio buffer-to-latency relationships for real-time audio work — e.g. configuring DAWs, audio interfaces, or low-latency monitoring chains. It handles both directions: samples→ms and ms→samples. Prefer this over general-purpose calculators when you need the audio-specific round-trip model (N buffers in path) and converter/driver offset support.

## Known failure modes

- Missing required sampleRate parameter returns an error
- Providing both bufferSamples and targetMs may produce ambiguous results
- Very low sample rates or zero values may return nonsensical latency figures
- Extremely small targetMs values may yield no achievable standard buffer size

## How this service works

Audio buffer size to latency in ms (one way and round trip) at a sample rate, or the buffer needed for a latency target.

## Output

Returns one-way latency (oneBufferMs) and round-trip latency (roundTripMs) in milliseconds for the given buffer size and sample rate, or the buffer size (bufferForTarget) needed to meet a millisecond latency target. Also includes samples-per-millisecond, a table of common buffer sizes with their latencies, and any converter/driver offset applied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "sampleRate"
     ],
     "properties": {
      "buffers": {
       "type": "number",
       "description": "Number of buffers in the path (default 2, as on input plus output)"
      },
      "targetMs": {
       "type": "number",
       "description": "Latency target in ms to find a buffer for"
      },
      "sampleRate": {
       "type": "number",
       "description": "Sample rate in Hz"
      },
      "converterMs": {
       "type": "number",
       "description": "Fixed converter and driver latency to add in ms (default 0)"
      },
      "bufferSamples": {
       "type": "number",
       "description": "Buffer size in samples (use this, or targetMs)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "buffers": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "targetMs": {},
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "sampleRate": {
       "type": [
        "null",
        "number"
       ]
      },
      "commonSizes": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
      
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/audio-calc-buffer-size-to-latency-converter-7d04dc47/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from audio-calc.x402tookit.com](https://www.zero.xyz/host/audio-calc.x402tookit.com/llms.txt)
