SFML community forums

Help => Audio => Topic started by: SajSFML on June 22, 2020, 06:54:08 pm

Title: How to disable audio's CPU information message?
Post by: SajSFML on June 22, 2020, 06:54:08 pm
Whenever I create a new sf::Music, it always logs this into my console:

CPU info (x86-64):
  CMOV ....... Y
  MMX ........ Y
  SSE ........ Y
  SSE2 ....... Y
  SSE3 ....... Y
  SSSE3 ...... Y
  SSE41 ...... Y
  SSE42 ...... Y
  AVX ........ Y
  FMA ........ Y
  AVX2 ....... Y
  AVX OS sup . Y

Is there a way to disable this from being outputted?
Title: Re: How to disable audio's CPU information message?
Post by: eXpl0it3r on June 22, 2020, 07:05:26 pm
That seems to originate from FLAC and hapens if DEBUG is defined.
Are you building everything in one solution? Or where did you get SFML and its dependencies from?
Title: Re: How to disable audio's CPU information message?
Post by: SajSFML on June 23, 2020, 04:17:13 pm
I have installed SFML via vcpkg and linked SFML with CMake via vcpkg.

And, I don't think I am building the entire thing. I only link the CMake targets I need from SFML (which is sfml-audio, sfml-network, and sfml-graphics)
Title: Re: How to disable audio's CPU information message?
Post by: eXpl0it3r on June 23, 2020, 04:24:55 pm
vcpkg pulls in its own FLAC build, I guess when running in debug mode they also use a debug build for FLAC, thus you're getting those information on the terminal. If you switch to release mode then it should also be using FLAC in release mode and the information should not be displayed anymore.

When using the FLAC builts shipped with SFML, you won't see them, since we've built FLAC in release mode.

So I guess if you don't want those messages in debug mode, you'll probably have to check with vcpkg to not build FLAC in debug mode or similar.
Title: Re: How to disable audio's CPU information message?
Post by: SajSFML on June 23, 2020, 04:45:55 pm
Oh okay. I guess I can just ignore it in debug mode, and build in release mode when I am done with my project. Thanks for clearing things up!