I got an issue with SDL, after I successfully init SDL audio and run SDL_OpenAudio() , everything goes well ,but if disconnect the current audio device or switch to another , SDL_AudioCallBack() never runs again and SDL_CloseAudio()\SDL_QuitSubSystems() can not return .
so, how can I fix this ? thanks a lot!
solved out, cuz SDL uses XAudio2 defaultly, but this goes unsuitable in SDL,maybe a issue on SDL or XAudio2.
then I use DirectSound as the driver , code runs fine.
SetEnvironmentVariable(L"SDL_AUDIODRIVER",L"directsound"); // tell SDL use DirectSound
Related
I'm continuing my journey through GStreamer and am stuck once again. I'm running the first tutorial and can hear sound but no video.
The error that I'm seeing is:
gldisplay gstgldisplay_cocoa.m:175:gst_gl_display_cocoa_setup_nsapp: Custom NSApp initialization failed
Am I missing a plugin or some required library here? I'm on an M1 Mac.
I should note, that via the command line everything works just fine.
gst-launch-1.0 playbin uri="file:///Users/vukasin/Downloads/sintel_trailer-480p.webm"
Maybe this is OpenGL related? I'm guessing its trying, and failing to open the video.
I just figured out what was going on with this error after spending hours thinking my system was not setup correctly. This issue is that a GMainLoop must be ran for the windowing to work correctly from the main thread. Interesting enough the tutorial 12 does it correctly and does the same exact thing. https://gstreamer.freedesktop.org/documentation/tutorials/basic/streaming.html?gi-language=c
Good day!
Our application should play the sound that came from the network from the server and collect sound from the user through a microphone and send it back to the server. For these purposes (render and capture) we use OpenAL. Everything works fine when we use the equipment built into the Mac. When we use bluetooth headphones that have microphone, problems arise. For example, Apple Airpods or Meizu POP.
If we use OpenAL implementation that Apple provides, there is no sound rendering at all. Device doesn't process sound data and alGetSourcei(/*our source*/, AL_BUFFERS_PROCESSED, &buffersProcessed) always set buffersProcessed in 0.
If we use OpenAL-Soft implementation, device process incoming data and we hear the sound. But this sound is muffled, with noises, like the sound from an old VHS video cassette.
Rendering and capture run in separate threads and device access is not synchronized. The logic for capturing and rendering is standard and done according to the OpenAL documentation.
Maybe someone has encountered such incorrect behavior? I will be glad of any help and questions.
Thanks!
I'm building a Webcam recording application with Qt 5.3 using vlc-qt, the problem is while previewing Audio/Video high feedback/noise and echo starts and gets higher, I've been googling and found it's the effect called Larsen's effect and how it's happening.
Notes:
I know using a headphone is a solution
I'm on a Windows 7 Ultimate Notebook
The Microphone Boost on zero dB is less noise but echo is persistent
My Questions:
How other webcam recording applications suppress the noise and the echo?
Specifically, how it can be fixed in VLC, your answer can be commandline arguments, notes or instructions to do in VLC software, it doesn't have to be code
Thanks!
I found http://www.dspcottage.com/en/algorithms/AEC a C++/MFC echo cancellation application based on Speex, but I needed to use it in Qt so I scrapped all MFC related code and here is the final solution https://github.com/Marware/Cpp_AEC
I'm trying to get mpg123 audio decoder to work with QT on windows. How do i play the decoded audio data at the right speed with Qmultimedia module in push mode. Currently i'm using simple timer to get it to play audio but it's not very efficient way to do it, if I do anything else at the same time audio get all distorted. Is there any better way to send the decoded data to audio output? It would be nice if anyone could point me to any nice examples using Qmultimedia module and Qaudiooutput class. I've tried to figure out QT example project "audiooutput" but it seems that it's also using timer to send audio to output in push mode.. Hope that I'm not too confusing.
I also had to figure that out and I would also suggest using the Phonon framework to do this.
It uses Windows Media Player as host on Windows, QuickTime on Mac and some KDE stuff on Linux.
So it's pretty platform independent.
If you need more low-level functionality, you should take a look into an open-source project called portaudio. It's very easy to use and you can manipulate or even fill buffers from code.
I used it to build an oscillator.
Hope that helps!
Best,
guitarflow
I am working on Windows xp and am trying to get a simple video player running.
I am trying to use Phonon::VideoPlayer module for this. I am connecting the signal as
connect(self.player,SIGNAL("finished()"),self.player.deleteLater)
and then , when the Play button is pressed, it makes the following call:
self.player.play(Phonon.MediaSource("C:\\vid.mp4"))
But, this doesn't display the video in the video player widget. Neither can I hear audio. Can anyone help??
I tried using different video file formats but no luck.
Try writing
self.player.play(Phonon.MediaSource("C:\\vid.mp4"))
to escape the \
Phonon::MediaSource mediaSource= Phonon::MediaSource("C:\\vid.mp4");
Try creating media sources like this and also other Phonon objects..