SDL2 Mixer: "No SoundFonts have been requested" - c++

I can't open audio device, my code is very simple:
Mix_Init(...);
Mix_OpenAudio(44100, AUDIO_U16SYS, 1, 16);
And error from Mix_GetError():
No SoundFonts have been requested
Any ideas why? My OS is Linux Mint 17 x64, SDL2 come from repository.

Apparently, this is caused by a dependency on FluidSynth, which requires a sound font to be selected at startup.
From the patch:
Because the backend is determined when Mix_OpenAudio is called,
Mix_SetSoundFonts needs to be called before this.
It may be possible to disable MIDI in order to avoid having to specify a sound font.

Related

SMFL library not loaded error in Mac OS BigSur

Hello I have installed SFML in my M1 chip Bigsur using this tutorial https://www.youtube.com/watch?v=WOyp5n2FmZY and also fixed all the error related to M1 chip.But when I run my project I get this pop ups.
popups
dyld: Library not loaded: #rpath/../Frameworks/vorbisfile.framework/Versions/A/vorbisfile
Referenced from: /Library/Frameworks/sfml-audio.framework/Versions/2.5.1/sfml-audio
Reason: no suitable image found. Did find:
/Library/Frameworks/vorbisfile.framework/Versions/A/vorbisfile: code signature in (/Library/Frameworks/vorbisfile.framework/Versions/A/vorbisfile) not valid for use in process using Library Validation: library load disallowed by system policy
It even showed pop ups for every frameworks I went to settings and gave allow for each of them. But it kept on showing same popup how can I solve this problem in BigSur
I think you will find that the library in question has been quarantined by the operating system. I would suggest:
confirm the quarantine flag ls -l# /path/to/library-or-library_bundle
remove the quarantine flag sudo xattr -d com.apple.quarantine /path/to/library-or-library_bundle
You can also go to your system preferences, then Security & Privacy. On General you see the settings for Allow apps downloaded from:. If you have a message like the one you have mentioned above, it says here "your.framework" was blocked from use because it is not from an identified developer with a button Allow Anyway next to it. Click it.

How to fix "SDL_Init failed -1" in buildroot Raspberry image?

I'm trying to compile Navit for Raspberry Pi 3 with Buildroot image (WPE Framework included). There is only WPE Framework running on startup (no x server) therefore I would like to display Navit using framebuffer directly. I know there is support for this feature. I have configured Navit as follow:
https://i.stack.imgur.com/cDZ3O.png
but I'm not able to run it anyway. There is following error:
error:graphics_sdl:graphics_sdl_new:SDL_Init failed -1
I've installed SDL from buildroot. How to fix it or make SDL more verbose to find out what is the reason of this -1 error (missing dependencies, incompatible lib version, Navit configration problems, missing system variables pointing to specified dependencies)?
It turned out that Navit is very quiet about SDL error messages. -1 Error is just very general information... I had to recompile Navit sources and add SDL_GetError() function to code to find out what is a real reason.
The problem was missing mouse. I don't need it so I had to set up:
export SDL_NOMOUSE=1

Initializing SDL_Mixer gives error "Can't setup PulseAudio stream"

I'm coding an app on my raspberry-pi 3 running on Ubuntu-MATE.
I use C++ on code::blocks with SDL and SDL_Mixer to play mp3 files (I'm still using the v1.2 of the SDL libs).
I get no error when I init SDL, but when I init SDL_Mixer with this line :
Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 1, 1024)
It returns -1, so I get the error message with the Mix_GetError() method, and it gives me a "Can't setup PulseAudio stream" message.
I'm not aware of what PulseAudio is, so after some research I understood it's used for network streaming audio streams.
Why this module is needed at the init of the lib, and is there a way to go around it ? I don't intend to use network features in my app.
Also, I checked with a "sudo apt-get install pulseaudio" to make sure I wasn't missing some libs, but my packet manager seems to indicate that I have the latest update...
Any clues would really help me a lot !
Thanks
I finally resolved it myself... it was a fricking typo.
I wrote 444100 instead of 44100 for the frequency init parameter :/
Everything now load correctly (for SDL, I just used SDL_INIT_EVERYTHING for the ones who asked).
By the way, I only use SDL to use SDL_Mixer; I suppose SDL_Mixer can't run as standalone, so which module can I load in SDL to only init the basics ?
Also, now I'm curious : why does SDL_Mixer needs PulseAudio to init ?
Thanks

Error: Qt5 Video render error code 80040218

When running an application in Qt5 made ​​using the QWebView, I accessed a page with a video player in HTML5, but the video does not play and qt/directshow shows the following error:
DirectShowPlayerService::doRender: Unresolved error code 80040218
DirectShowPlayerService::doRender: Unresolved error code 80040218
Details:
Qt5.1.1 MingW4.8 32bit
Windows 7 64bit
I suspect that is why my Windows is 64bit, but the *QT/MingW** runs on 32bit and maybe miss some DLL/LIB.
How can I resolve this?
Thanks.
The error code is rather generic: 0x80040218 VFW_E_CANNOT_RENDER "No combination of filters could be found to render the stream." and the typical cause is that the application cannot decode media feed because it lacks decoding components, such as codec for this video feed is not installed/available.
install K-Lite_Codec_Pack_1540_Basic in your machine, this error not related to pyqt5 and any other
You may check out 'LAV Filters'. It solved my rendering problem: 'DirectShowPlayerService::doRender: Unresolved error code 80040266'.
Download installer: http://forum.doom9.org/showthread.php?t=156191 And the source code: https://github.com/Nevcairiel/LAVFilters
If you are a developer, you can download and use ffmpeg to decode and encode your file to avi(windows) or mov(mac).

EDSDK cpp error: 10 EDS_ERR_MISSING_SUBCOMPONENT

I am trying to get started with EDSDK to control my Canon 500D. I'm new to cpp, and windows XP apps and I'm using visual studio. After a great deal of blind trial and error I have finally managed to get the app to compile the basic sample code from the documentation. To do this I have the EDSDK.h, EDSDKTypes.h and EDSDKErrors.h headers in the right places and the EDSDK.dll and EDSDK.lib in the same folder as the code. It seems to be picking these up. I have got the 500D to be recognised by the PC so I believe the USB drivers are there.
The code is just trying to pick up the camera:
EdsError err=EDS_ERR_OK;
EdsCameraListRef cameraList=NULL;
err = EdsGetCameraList(&cameraList);
if(err == EDS_ERR_OK)
{...}
However, when I run this console app the error is picked up as 10 - which suggests, according to the document, that there is a missing subcomponent. This happens both if the camera is connected or not, so I'm thinking this is something missing from the compile. But I am getting nowhere with the documentation.
I have installed the edsdk 2.4 Windows version from a download not the official route, so this may be an issue.
Can anyone help? Specifically how can I find out what the missing subcomponent might be so I might include it. Is this a subcmponent of the build like a header file or something like a driver?
I know, old question but still it might help someone with the same problem.
From the documentation:
All DLLs are required in order to execute an EDSDK client application.
All of the modules in the DLL folder must be copied into the same folder where the EDSDK client application is in.
This means you'll have to have all DLLs beside your *.exe. Namely these DLLs:
DPPDLL.dll
DPPLibCom.dll
DPPRSC.dll
EDSDK.dll
EdsImage.dll
Mlib.dll
Ucs32P.dll