Author Topic: FLAC Support  (Read 8107 times)

Offline mercy

  • Colonel
  • ****
  • Posts: 341
    • View Profile
FLAC Support
« on: October 27, 2013, 08:40:09 pm »
What's up with the FLAC playing libraries? This type of music sounds awesome and the wiki says FLAC is supported.

Game now says "Unsupported music format. Make sure you installed OpenXCOM correctly."  First tried the ADLIB Flac music, then mine.

My lossless FLAC file is:   libFLAC 1.2.1

File name    GMGEO1.flac
File size    23.60 MB (24,157,536 bytes)
File attributes    - --a- ----
Audio format    FLAC
Audio sample rate    44,100
Audio bit rate    1411200 Kbps nominal VBR
Audio bit depth    16 bit
Audio channels    2  (Stereo)
Audio length    00:04:47.742 (12,689,408 samples)

When I compress it to OGG it becomes an ugly 5MB file, which is somewhat like having a REALLY SMALL GARAGE and a recently bought large BMW.
- How to fit the shiny new BMW into the small garage?
- Umm.. compress it with a metal crusher to OGG and Voila' you will see it fits!

Okay. Screaming metallic sounds of the car and the power crusher machinery can be heard, then:

- Okay did that. Now the BMW is in the garage. But, it looks a lot different!
« Last Edit: October 27, 2013, 08:49:23 pm by mercy »

Offline mercy

  • Colonel
  • ****
  • Posts: 341
    • View Profile
Re: FLAC Support
« Reply #1 on: October 27, 2013, 09:31:35 pm »
Update:

The difference is audible between an OGG VBR Quality 1.0 48Khz stereo and the FLAC.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: FLAC Support
« Reply #2 on: October 28, 2013, 12:03:24 am »
FLAC works fine for me. If you're on Linux or something, check that your SDL_Mixer has the appropriate FLAC libraries maybe?

Offline mercy

  • Colonel
  • ****
  • Posts: 341
    • View Profile
Re: FLAC Support
« Reply #3 on: October 28, 2013, 11:43:52 am »
How?   I'm on WinXP SP3  using the latest GIT builds. I also tried a completely fresh OpenXCOM install without any MODs, just the midi cat files and the ADLIB FLAC-s, same error.

Can you make OpenXCOM accept this FLAC example file that I attached?
 (- e.g. not display and error message - )

If I put only one FLAC (or the whole pack) into the sound directory I get:

Quote
ERROR:  unrecognized music format.
Make sure you installed OpenXCOM correctly.
Check the requirements and documentation for more details.

Could you please post a list what is in your SOUND directory? Also your FLAC file info?

General
Complete name                  GMGEO1.flac
Format                         : FLAC
Format/Info                    : Free Lossless Audio Codec
File size                      : 23.0 MiB
Duration                       : 4mn 47s
Overall bit rate mode          : Variable
Overall bit rate               : 672 Kbps
Album                          : X COM - Enemy Unknown
Track name                     : Geoscape 1
Track name/Position            : 02
Performer                      : John Broomhall
Recorded date                  : 1994
Audio
Format                         : FLAC
Format/Info                    : Free Lossless Audio Codec
Duration                       : 4mn 47s
Bit rate mode                  : Variable
Bit rate                       : 670 Kbps
Channel(s)                     : 2 channels
Sampling rate                  : 44.1 KHz
Bit depth                      : 16 bits
Stream size                    : 23.0 MiB (100%)
Writing library                : libFLAC 20080709 (UTC 2008-07-09)


Can you please attach a small FLAC file so I can see what format the game recognizes so I can save in that?
« Last Edit: October 28, 2013, 12:00:47 pm by mercy »

Offline mercy

  • Colonel
  • ****
  • Posts: 341
    • View Profile
Re: FLAC Support
« Reply #4 on: October 28, 2013, 01:43:47 pm »
Update

FLAC support is broken in GIT.

Bug report filed.

I installed a clean OpenXCOM using 0.9 installer. Everything works fine, the game has FLAC music by default(I put the ADLIB Flac set into the UFO DEFENSE sound dir) and doesn't complain about unrecognized music format.

As soon as I overwrite parts of the OpenXCOM dir with the latest GIT,  FLAC  ceases to work, giving an error message.
« Last Edit: October 28, 2013, 01:52:41 pm by mercy »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: FLAC Support
« Reply #5 on: October 29, 2013, 03:27:34 am »
I just downloaded the Adlib-FLAC.zip in this website and extracted it to my SOUND folder: https://xcom-sounds.atw.hu/

It's possible that the SDL_Mixer used in the Git Builder doesn't include libFLAC (the stable releases are compiled differently). I'll check with _michal about it.

Offline mercy

  • Colonel
  • ****
  • Posts: 341
    • View Profile
Re: FLAC Support
« Reply #6 on: October 29, 2013, 09:45:45 am »
Thank You!   8)

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: FLAC Support
« Reply #7 on: October 29, 2013, 09:12:50 pm »
It should be working again from 2013_10_29_1445 onwards.

Offline mercy

  • Colonel
  • ****
  • Posts: 341
    • View Profile
Re: FLAC Support
« Reply #8 on: October 29, 2013, 09:19:36 pm »
Oh my God, it works! And it sounds like heaven. Thank You!

Question:  Does the game play GMGEO* where * = 0..9 
or can * be higher than 10, maybe 0..20?
I have collected a bigger soundtrack, will GMGEO14 play with the current code?
« Last Edit: October 29, 2013, 09:21:10 pm by mercy »