Comments (2)
Got it working.
from apulse.
I noticed if I use sleep or usleep to prevent high cpu mainloop cycles, firefox stops processing more data which will result in empty callbacks too.
I managed to filter out normal underruns, but I need to find a way to clock/sleep inside the mainloop to keep the cpu usage low without thread blocking firefox internal buffer fill code.
So normal sleep or usleep functions do not work, because they prevent loading new data on firefox side.
Update 1:
So I found out, that the pa_threaded_mainloop gets locked and unlocked.
While we are inside "data_available_for_stream", the thread is locked as far I can see.
If the thread is locked and a sleep gets called, the sleep gets executed in the parent thread (which is firefox audio processing thread) instead of the current thread.
If I comment out all lock/unlock logic, sleep does work and firefox does always provide data.
But its a bad idea to disable all locking and unlocking logic, can someone tell me how I can sleep inside data_available_for_stream() while the thread is locked without sleeping in the firefox audio thread? I just want to sleep inside the mainloop thread.
from apulse.
Related Issues (20)
- Error when starting application with apulse HOT 1
- Firejailed browsers no sound (Firefox & Brave) HOT 1
- Firefox 71.0b6 no sound HOT 2
- No alsa sound in FF 69 HOT 1
- No sound with FF 73 (working with FF 72) HOT 1
- Apulse does not work with alsa ioplug HOT 1
- apulse with firefox 68.6.esr (devuan) HOT 7
- chromium/brave error in trisquel etiona/ubuntu 18.0 HOT 9
- patchelf not working HOT 2
- fluidsynth 2.1.3 can't find pa_threaded_mainloop_get_api symbol HOT 2
- viber complains for old version of PulseAudio server HOT 1
- Fix building with PulseAudio 13
- Audio lags behind by .5 seconds on Factorio HOT 3
- Capture device leaves browser with locks held
- apulse should not even exist HOT 2
- Is this project unmaintained? HOT 3
- apulse + firefox reader view causes speech to fail for other applications
- What is more secure, apulse or PipeWire? HOT 2
- Telegram doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apulse.