-
Notifications
You must be signed in to change notification settings - Fork 238
A11y Sound Alert for new person and new chat message #2640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
It compiled without a problem on both Windows and Mac machines, but it failed on autobuild on Github. Thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It compiled without a problem on both Windows and Mac machines, but it failed on autobuild on Github. Thoughts?
Project ERROR: Unknown module(s) in QT: multimedia
We are only downloading the required modules in the build scripts, so those lists need to be adjusted. Those might be the proper places:
$ grep archive.*qtbase .github/ -rn
.github/autobuild/android.sh:73: --archives qtbase qttools qttranslations qtandroidextras
.github/autobuild/ios.sh:23: python3 -m aqt install-qt --outputdir "${QT_DIR}" mac ios "${QT_VERSION}" --archives qtbase qttools qttranslations
.github/autobuild/ios.sh:28: python3 -m aqt install-qt --outputdir "${QT_DIR}" mac desktop "${QT_VERSION}" --archives qtbase
.github/autobuild/windows.ps1:45: "--archives", "qtbase", "qttools", "qttranslations"
.github/autobuild/mac.sh:22: python3 -m aqt install-qt --outputdir "${QT_DIR}" mac desktop "${QT_VERSION}" --archives qtbase qttools qttranslations
Minor general request: Your changelog suggestions sound good. Can you put them on the same line as the CHANGELOG: prefix in your PR descriptions? That way our script can pick the text up directly.
It seems like this PR introduces those sound effects unconditionally for all users. While I understand that some people might want or even need those, I think those need to have a way to be turned off (probably even by default in order to avoid changing the behavior for the existing user base?).
|
1. Thanks! I changed the auto build scripts and pushed a new commit to
my ranch with the PR. Do I need to make another PR?
2. I updated the CHANGELOG: line.
3. I agree. If someone could implement this in the setting to toggle the
future might be a good idea.
|
|
@hoffie I just added qtmultimedia on the suggested lines, but all the builds except iOS failed. |
src/clientdlg.cpp
Outdated
|
|
||
| void CClientDlg::OnChatTextReceived ( QString strChatText ) | ||
| { | ||
| QSoundEffect* sf = new QSoundEffect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I turn this off?
src/clientdlg.cpp
Outdated
|
|
||
| void CClientDlg::OnNumClientsChanged ( int iNewNumClients ) | ||
| { | ||
| if ( iNewNumClients > iClients ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I turn this off?
(It should be off by default.)
|
Is there someone who could help with implementing a toggle in the setting dialog? I'm blind, and unfortunately qt designer is not accessible. |
|
@henkdegroot @mulyaj I think you worked with the GUI? |
@chigkim, perhaps I can help out with the setting. Are you sure a setting in a GUI dialog is the best/most convenient option? |
Umm, my first thought was "this should be covered by the hash key calculation", but the log and the code say otherwise. The code still refers to the old, no longer existing paths. Seems like I've missed that in autobuild refactoring cleanups. The Linux build failures are not related to that part though (no caching there). In that case I suspect that we need to install |
|
@chigkim, I have cloned your branch and locally compiled without issues. However I don't hear any sound when a chat message arrives or when a new client joins the session. Any thoughts on this? |
I suspect that by using Qt's audio code a totally different routing can apply. In other words, Jamulus may output to ASIO or Jack, but Qt will likely use the OS default instead, which might be a different device. Another update regarding the build failures: Android seems to have a non-cache related cause as well (Manifest/permissions). Although the mssages seem logical, I can't really tell why they appear right now. Seems related to #2403. |
The above is how all Client (or Server) settings should work. |
|
I've filed #2642 for the cache key fix and I've started a CI run for this PR (#2642) plus the fix in my fork. That should hopefully show that the qtmultimedia-based failure is gone on Mac/Windows. Edit: Looks good at first glance -- thank you @henkdegroot for the heads up! |
|
@henkdegroot, thanks for your help! I think toggle in the setting dialog would be a better option than command line. |
It should. The files in your PR play properly using I'm wondering whether it is possible and maybe even better to leave such possible notifications to the screen reader and just try to instruct the screen reader accordingly? Maybe QAccessibleEvent is of any help? |
|
@hoffie, as far as I know unfortunately QT doesn't have a way to send a generic announcement with custom message to screen readers other than sending new value changed event for a specific UI element. |
|
@chigkim, still can't seem to get the sounds alerts working. I have also tried updating the code to use QSound. I am using a windows 10 device. I am testing my local build which I create using the powershell script provided (deploy_windows.ps1) and it uses Qt 5.15.2. |
|
@henkdegroot, have you checked your Windows default sound card? As hoffie mentioned, the sound alert should play through whatever your Windows default sound output is set to, not necessarily what Jamulus uses. |
|
@henkdegroot, also, you could try my build. https://www.dropbox.com/s/1cevtv50e9077o9/Jamulus-a11y-sound-alert.zip?dl=0 |
|
@chigkim I will give your build a try and will also test with another windows laptop. I do get audio alerts from other programs so that is not the issue. I thought that perhaps the ::fromfile was trying to load a local file instead of the file from the resources. Hope to have some time in the weekend for this. |
|
@chigkim, tested your build and tested with another windows laptop. Both cases I do not hear any notifications on new client and chat messages. |
|
I asked some people to test the same build a couple of days ago, and
they said it all worked fine for them. Are you using an external audio
interface with Asio driver, or built-in sound card with asio4all?
|
I am using a built-on sound card with asio4all. I even tested with all other sound drivers disabled, and not difference. Not hearing sounds when a New Client joins or when a Chat Message is received. So not sure why I don't get these sound notifications. |
|
@chigkim do you think this will make it up in the next few days to be able to get included into the next release? If not, I think it's worth to de-tag. |
|
Just adding my view, as much I would like to assist creating a gui setting to be able to turn this on/off, I can only do so when I am able to get it working in the first place. If it fails for me, it probably fails for more people and we end up getting issues reported in that. I don't believe this not working is caused by my setup but don't know what is causing this. |
|
Sorry to be annoying... Can the build script changes be split out, at least into a separate (initial) commit? What I look for is that each commit builds on its own, with no dependency on later commits. Now that may be the case here but
|
The build scripts are only touched to add the newly required dependency. Yes, this has to be done first or at the same time as introducing the code which uses it. Not sure if you saw my question in the chat: I could split that part out into its own commit, but it wouldn't be meaningful on its own. We wouldn't add the
Usability-wise I agree (i.e. it should be part of one PR and this is the case here). Technically, both states are buildable/usable on its own. If that's not acceptable, I would have to squash the GUI setting addition into the other commit as well. Do you want me to do that? (Not sure when you've started reviewing -- your comment was posted only a few minutes after my rebasing/squash push; no code has changed, only git history did). |
|
Yes, I was checking the individual commits for sanity as a squash/fixup rebase had been done. Based on what you've said, I think a single commit would make most sense. |
|
If I install this new version, does it require access to hardware that I might have dedicated to Jamulus and thus cause Jamulus to fail to load? Say I have a single audio system with a sound drive that only allows exclusive access to the sound card and that's what I expect Jamulus to use. Does simply having this feature cause a problem under those circumstances (even when it's not switched on)? One other fundmental issue I have with the approach is that it's adding non-visual code to ClientDlg. That shouldn't happen. Why would I not want the audio alerts if I were using the JSON RPC client without the graphic UI? |
pljones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With comments as per conversation / chat.
That's exactly an/the issue which needs to be avoided. |
| <item> | ||
| <widget class="QLabel" name="lblAudioAlerts"> | ||
| <property name="text"> | ||
| <string>Audio Alerts</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--> Audio Alerts (might need secondary sound hardware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm, not sure if there's space for so much text. Have you checked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could add a tooltip later - and something clear in the documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The What's this text does have a hint regarding that already, btw.
Ok. Squashed to a single commit now (with author information preserved as Co-authored-by).
Based on my understanding, I would not expect such issues. Solely linking to qtmultimedia should not cause any audio devices to be considered "in use". All playback happens on demand, which means it happens after initializing Jamulus' main audio stack. So if exclusive access is a problem, I'd assume that the new feature breaks and not Jamulus' core functionality. As far as I understand, this feature was part of @chigkim's a11y build which had already been in use by some people? And as a last "Let's try it" argument: We are preparing a new minor release, which is not supposed to cause breakage, but is known to carry larger changes. We still have some time during betas to find possible issues.
Understandable, especially regarding future plans. I'll open that as a separate issue. |
|
Christian Hoffmann dixit:
Based on my understanding, I would not expect such issues. Solely
linking to qtmultimedia should not cause any audio devices to be
considered "in use". All playback happens on demand, which means it
happens after initializing Jamulus' main audio stack. So if exclusive
access is a problem, I'd assume that the new feature breaks and not
Jamulus' core functionality.
AIUI / in my experience (pure ALSA-based system, no Poettering stuff)
it is so that you have to start jackd (usually via qjackctl) before
starting Jamulus, and that fails if anything uses the sound device,
and afterwards any audio has to go via JACK anyway, so if anything
is playing once jackd is started, it either goes through JACK (and
thus is multiplexed) or is not audible (because jackd has exclusive
access to the soundcard) or goes through a different soundcard which
jackd does not use.
bye,
//mirabilos
--
21:12⎜<Vutral> sogar bei opensolaris haben die von der community so
ziemlich jeden mist eingebaut │ man sollte unices nich so machen das
desktopuser zuviel intresse kriegen │ das macht die code base kaputt
21:13⎜<Vutral:#MirBSD> linux war früher auch mal besser :D
|
Plays sound when someone joins/leaves. Plays sound when receiving a new message. Uses QtMultimedia for playback. Sounds are from Freesound (licensed CC0): - new_message.wav from https://freesound.org/people/zrrion_the_insect/sounds/469014/ - new_user.wav from https://freesound.org/people/deleted_user_4772965/sounds/256513/ Co-authored-by: henkdegroot <13550012+henkdegroot@users.noreply.github.com> Co-authored-by: Christian Hoffmann <mail@hoffmann-christian.info> Co-authored-by: Peter L Jones <pljones@users.noreply.github.com>
|
@hoffie this PR created a wrong CHANGELOG entry. |
|
Also, we need to get COMPILING.md updated to mention that |
I believe I did this already as part of this PR....can you check please? |
|
Ah sorry, I meant to come back and say it was user error on my part. I've noted elsewhere it needs highlighting as part of the release. |
|
r3_9_0beta2 didn't pick up: |
|
I think @pljones forgot updating the changelog for this beta |
|
Ah ok. Last time I checked, asio4all locks up and prevent other apps to
play sound through the card it uses. I suspect asio4all is blocking QT
to play sound with QSoundEffect.
If I use asio4all with built-in sound card, it even blocks screen
reader. That's why screen reader users would use an external audio
interface with its own Asio driver for music apps like Jamulus and use
built-in sound card for OS system output and screen readers.
Do you have an external audio interface with Asio driver that you could
test with?
Skip asio4all and use that audio interface with Jamulus. Then set your
built-in soundcard as your OS system output.
Then hopefully you'll hear it.
|

Short description of changes
Added sound Alert for new person and new chat message
CHANGELOG: Added sound Alert for new person and new chat message
Context: Fixes an issue?
Screen reader users has no idea when someone joins or when receiving a new chat message. This plays a short sound alert for those events.
Does this change need documentation? What needs to be documented and how?
The sound alerts play through OS sound output. for this to work on Windows, your system sound output may need to be different than what Jamulus uses depending on the audio device/driver being used.
Please include the new GUI setting in the documentation.
The original sound files are from Freesound, and they were edited to fit the context in Jamulus.
new_message.wav: https://freesound.org/people/zrrion_the_insect/sounds/469014/
new_user.wav: https://freesound.org/people/deleted_user_4772965/sounds/256513/
The licenses are CC0.
Status of this Pull Request
What is missing until this pull request can be merged?
Checklist