tsoding / musializer

Music Visualizer
MIT License
953 stars 100 forks source link

FLAC Format is supported in raylib #78

Closed starapo7348 closed 8 months ago

starapo7348 commented 9 months ago

Raylib supports the first six formats by default as you documented it, but support for FLAC isn’t included unless you compile it in yourself. If you want it, you’ll need a customised build with the SUPPORT_FILEFORMAT_FLAC flag turned on.

I have enabled FLAC support in config.h and recompiled raylib completely and now it is working.

INFO: AUDIO: Device initialized successfully
INFO:     > Backend:       miniaudio / PulseAudio
INFO:     > Format:        32-bit IEEE Floating Point -> 16-bit Signed Integer
INFO:     > Channels:      2 -> 2
INFO:     > Sample rate:   48000 -> 48000
INFO:     > Periods size:  3600
INFO: FILEIO: [./resources/fonts/Alegreya-Regular.ttf] File loaded successfully
INFO: TEXTURE: [ID 3] Texture loaded successfully (1024x512 | GRAY_ALPHA | 1 mipmaps)
INFO: FONT: Data loaded successfully (64 pixel size | 95 glyphs)
INFO: TEXTURE: [ID 3] Mipmaps generated automatically, total: 11
INFO: FILEIO: [./resources/shaders/glsl330/circle.fs] Text file loaded successfully
INFO: SHADER: [ID 4] Fragment shader compiled successfully
INFO: SHADER: [ID 5] Program shader loaded successfully
INFO: TEXTURE: [ID 4] Texture loaded successfully (1600x900 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 1] Depth renderbuffer loaded successfully (32 bits)
INFO: FBO: [ID 1] Framebuffer object created successfully
INFO: STREAM: Initialized successfully (44100 Hz, 16 bit, Stereo)
INFO: FILEIO: [/home/starapo7348/Music/05-mj-bit.flac] Music file loaded successfully
INFO:     > Sample rate:   44100 Hz
INFO:     > Sample size:   16 bits
INFO:     > Channels:      2 (Stereo)
INFO:     > Total frames:  11379564
INFO: FILEIO: [./resources/icons/fullscreen.png] File loaded successfully
INFO: IMAGE: Data loaded successfully (2048x512 | GRAY_ALPHA | 1 mipmaps)
INFO: TEXTURE: [ID 5] Texture loaded successfully (2048x512 | GRAY_ALPHA | 1 mipmaps)
INFO: TEXTURE: [ID 5] Mipmaps generated automatically, total: 12
INFO: FILEIO: [./resources/icons/volume.png] File loaded successfully
INFO: IMAGE: Data loaded successfully (1536x512 | GRAY_ALPHA | 1 mipmaps)
INFO: TEXTURE: [ID 6] Texture loaded successfully (1536x512 | GRAY_ALPHA | 1 mipmaps)
INFO: TEXTURE: [ID 6] Mipmaps generated automatically, total: 11
INFO: STREAM: Initialized successfully (48000 Hz, 24 bit, Stereo)
INFO: FILEIO: [/home/starapo7348/Music/15. 405.3 Thumb CAD.flac] Music file loaded successfully
INFO:     > Sample rate:   48000 Hz
INFO:     > Sample size:   24 bits
INFO:     > Channels:      2 (Stereo)
INFO:     > Total frames:  8981433
INFO: AUDIO: Device closed successfully
INFO: TEXTURE: [ID 2] Unloaded texture data from VRAM (GPU)
INFO: SHADER: [ID 3] Default shader unloaded successfully
INFO: TEXTURE: [ID 1] Default texture unloaded successfully
INFO: Window closed successfully

screenshot

I have found this info here:

starapo7348 commented 8 months ago

Merged.