Class for reading MP3 files

I am writing a game that is slightly dependent on the soundtrack, so I want to read the mp3 file and use its data (for example, music speed, rhythm, etc.). Is there any class (preferably) that I could use, or an article that will cover everything regarding reading mp3 (from checking if this is really mp3 for actual decoding)? Well, if I need to do different calculations to find the rhythm and stuff, I just want to decode the file, since I don’t know the algorithm (and I don’t know whether it is difficult or not).

+3
source share
2 answers

Yes. This is hard. MP3 files are a typical DCT compression scheme with more or less loss. This process is similar to JPEG.

Recording an mp3 decoder and encoder is the project itself.

Encode

Quantize → DCT Transform → Entropy Encode → Store

Decode

Entropy Decoding -> IDCT -> Dequantize -> play

I offer FMOD its widespread and used in the gaming community.

+4
source

Perhaps look at mpeglib or SDL_mixer: http://www.libsdl.org/projects/SDL_mixer/ :) Under Windows?

/ mp3 , , HUGE ( mp3 ). , , !

0

Source: https://habr.com/ru/post/1782567/


All Articles