Contents

2. Core features

Ultra‑light Win 2.5MB · macOS 3.36MB · Linux ready
4 formats MP3/FLAC/OGG/WAV
Precise metadata WAV/FLAC 100%
Non‑blocking perfect for GUIs

📦 Size comparison

  • 🟢 ap_ds Windows: 2.5MB (SDL2.dll 2.1MB + mixer 400KB + py 42KB)
  • 🍎 macOS: 3.36MB (SDL2.framework 1.82MB + mixer 1.54MB + py 42KB)
  • 🐧 Linux: dynamically linked system SDL2, package ~50KB (needs libsdl2-mixer)
  • 🔴 FFmpeg approach: ≥160MB (ffplay+ffprobe)
  • 🟡 Pygame + parsing libs: bloated and incomplete

⚙️ Why so tiny?

  • Focused: playback only, no editing/transcoding
  • Built on industrial‑grade SDL2
  • Optimised to the byte
  • cross‑platform W/M/L

3. Technical comparison

Chapter 1: Pygame – the "audio handicap" of a game engine

# Pygame's unreliable audio duration
my_sound = pygame.mixer.Sound('my_song.mp3')
total_length = my_sound.get_length()  # reliable only for uncompressed WAV!
⚠️ Pygame's Sound.get_length() works correctly only for WAV; MP3/OGG/FLAC return nonsense.

Chapter 2: The FFmpeg suite – 160MB "at least" pain

ComponentFunctionSizeTotal
ffplay.exeplayback core≈80MB≥160MB
ffprobe.exemetadata probe≈80MB
ffmpeg.execonverter≈80MB≥240MB
🔍 Truth: three standalone executables, no Python wrapper included.

Chapter 3: The ap_ds revolution

Seven technical breakthroughs

  1. ✓ 2.5MB solves 160MB problem
  2. ✓ non‑blocking eliminates GUI lag
  3. ✓ precise progress queries
  4. ✓ zero‑dependency deployment
  5. ✓ AID multi‑audio management
  6. ✓ SDL2 performance
  7. ✓ smart C deps cross‑platform

4. Installation & usage

pip install ap_ds

Basic example

from ap_ds import AudioLibrary
lib = AudioLibrary()
aid = lib.play_from_file("music.mp3")
lib.pause_audio(aid)
lib.seek_audio(aid, 30.5)
duration = lib.stop_audio(aid)

DAP playlist (v2.3.0+)

aid1 = lib.play_from_file("song1.mp3")
recordings = lib.get_dap_recordings()
lib.save_dap_to_json("my_playlist.ap-ds-dap")

5. Technical manual

6. Open source license

DVS audio library (ap_ds) open source license v1.1

Effective date: 2026-01-23 · Project home: https://www.apds.top

I. Grant of rights

1.1 Basic freedom
Run, copy, study, modify, distribute, integrate, commercial use (including product integration / cloud services / selling / internal use).

1.2 Source code guarantee: full readable source provided; modified versions may be distributed in source or binary form.

II. Core obligations

2.1 Attribution & source notice
Retain original copyright; prominently display:
“Based on DVS audio library (ap_ds) v[version] original author: Dvs (DvsXT) project page: https://www.apds.top”
Modified versions must add a statement: unofficial version, maintainer is responsible.

2.2 Brand protection (strict)
❌ You may NOT name your modified version “ap_ds” or “DVS audio library”, nor imply continuity.
✅ You MUST use an independent brand and distinct logo.

2.3 Modified version quality pledge: clearly state changes, provide support, do not mislead users.

2.4 Prohibited illegal use

X. Quick usage guide

✅ You may any commercial use, modify, closed‑source integration, sell, distribute modified versions (independent brand), cloud service, internal use
❌ You may not use original brand name, delete copyright, illegal purposes, sue for patent infringement, create confusion in the ecosystem
👍 You should retain copyright, attribute source, report security issues, create independent brand for your modified version

License last updated: 2026-01-23 · Maintainer: Dvs (DvsXT)

7. Frequently asked questions

Q: Can a company integrate it in commercial products?

✅ Absolutely, no payment / notice / authorisation required.

Q: Can I modify and redistribute it?

✅ Yes, but you must use an independent brand, retain copyright, attribute, and provide maintainer statement.

Q: Do I have to open‑source my modifications?

❌ No, you may distribute closed‑source.

Q: Do I need to pay for cloud service usage?

❌ No, but contributions are welcome.

Q: What if I get sued for patent infringement?

📞 Contact the author immediately: me@dvsyun.top (backup dvs6666@163.com)

Q: Why such strict brand protection?

To protect users from confusion and ensure clear responsibility for each version.

8. Contact & support

📧 Licensing inquiries

me@dvsyun.top or dvs6666@163.com · response within 7 working days

🛠️ Technical support

GitHub Issues · docs at official site · emergency email

Website: https://www.apds.top (root domain)

PyPI: https://pypi.org/project/ap_ds/

Developer: Dvs (DvsXT)