1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
Commit Graph

108 Commits

Author SHA1 Message Date
Diadlo
72780e6c7a
docs(todo): Changed todo format 2016-08-19 00:20:24 +03:00
Diadlo
31d8e7eef0
docs: Replaced simple on doxygen tag 2016-08-19 00:20:23 +03:00
Diadlo
672744de96
docs(audio, video): Added leading stars 2016-08-19 00:20:23 +03:00
Nils Fenner
f00b9008e6
feat(settings): add notification signals for changed settings values
Makes changes to settings application wide transparent. The properties section is optional in theory, but comes in very handy, if we decide to access settings e.g. from within a script context.
2016-08-14 18:08:24 +02:00
Diadlo
29443040fb
docs(audio, video): Change comment style 2016-07-27 01:23:27 +03:00
Diadlo
2258748d28
style(audio, video): Style fixes 2016-07-13 01:54:37 +03:00
Nils Fenner
9694d6b6d4
fix(audio): actually disable the audio in/out device in settings, when selected
As esecially the "Disabled" text is translated, the audio device will change from "disabled" to "default", just by changing the language.

In contrast to video devices, an audio device is either always available, or sound will be disabled. So "Disabled" is the correct term to use here.
2016-07-01 10:41:41 +02:00
Nils Fenner
81df534c9a
refactor(audio): cleanup initialization of audio device lists
API:
* open default in/out device, when device name is empty
* move privatized code
* fix unsigned/signed conversion warnings

UI (settings):
* refactor: select audio devices by combobox index
2016-07-01 10:41:41 +02:00
Nils Fenner
bec635ad11
refactor(audio): cleanup initialization of audio device lists
* move private code
* fix unsigned/signed conversion warnings
2016-07-01 10:41:41 +02:00
Nils Fenner
792103f8b0
refactor(filter_audio): completely remove filter_audio dependency
The filter_audio API is not working for qTox/Tox and thus disabled by default via compiler switch. In current qTox UI, it is not configurable, even when this switch is enabled. According to issue #3194 the library is no longer maintained as well. I don't see any reason to keep it in qTox.
2016-06-04 22:12:27 +02:00
Nils Fenner
f72baa613f
feat(audio): add real gain control of the input device
The gain can be set now in dB values, providing acceptable results for a wide range of setups.

note: also introduces const-correctness and some minor cleanup.
2016-06-02 22:16:58 +02:00
Nils Fenner
356543ca3b
feat(audio): add (repair) support for group audio calls 2016-04-24 14:34:49 +02:00
tux3
c82e41ff6f
Properly ifdef filteraudio usage 2016-01-25 16:35:45 +01:00
tux3
9251f1f4ca
Fix #2854: Missing noexcept in Audio 2016-01-25 16:27:18 +01:00
Nils Fenner
26e7bde991
initialize OpenAL error stack 2016-01-23 16:45:25 +01:00
tux3
87c4907054
Remove redundant source init code 2016-01-23 16:45:25 +01:00
tux3
a2fbc277fc
Replace audio check macros by functions 2016-01-23 16:45:25 +01:00
tux3
6cad8d8fe9
Remove redundant check starting audio thread
Thanks to @antis81 for spotting it
2016-01-23 16:45:25 +01:00
tux3
6425448196
Implement the playMono16Sound API sanely
This API used to start *A NEW THREAD* for every sound played!!

Now we simply have a dedicated source and buffer to play those sounds, we use a timer to cleanup the buffer 50ms after the sound is done playing (if a new sound hasn't started in the meantime)
2016-01-23 16:45:25 +01:00
tux3
ce2f8fd1d5
Cleanup and improve audio input
We now subscribe to an event and wait for frames when capturing audio
input, the big avdantage is that we only have to fetch the frames from
the hardware once, and we don't need to cache anything.
The frames are simply dispatched to the client's callbacks immediately.

Also removes some outdated ifdefs that did not apply anymore.
2016-01-23 16:45:25 +01:00
tux3
0a1833a74b
Un-pimpl
This makes the code much shorter and easier to follow, especially since AudioPrivate was right in the middle of audio.cpp, awkwardly splitting things in two

Compile times should not be substantially affected since we just need to include the OpenAL C headers
2016-01-23 16:45:25 +01:00
tux3
fb68d3750c
Cleanup mic feedback related code
It simply doesn't work, so let's do it right later
2016-01-23 16:45:25 +01:00
Nils Fenner
ffbd8fba91
do not warn, when requesting the volume from an invalid audio device
Instead, we return a defined value (0.0) and keep quiet otherwise.
2016-01-23 16:45:25 +01:00
Nils Fenner
9b5c799742
fix getter for audio master output volume
Return the ALListener's gain as "master" volume.
2016-01-23 16:45:25 +01:00
Nils Fenner
7d547b10eb
major changes to audio volume control
* use the ALListener object for master volume control
* initialize audio sources
* audio volumes are now expressed as percentage values between 0 and 1 to the public API
* removed artificial amplification of input samples
* removed invalid audio source generation in group calls
* minor: fixed gain slider max. value to 100 percent
2016-01-23 16:45:25 +01:00
Nils Fenner
a6024b85ea
initialize a subscribed audio source with "master" volume instead of "max." 2016-01-23 16:45:25 +01:00
Nils Fenner
b3926c8904
change method description of Audio::setOutputVolume to what it should do 2016-01-23 16:45:25 +01:00
apprb
d02348c1f8
Fix #2774: Client freezes after attempt to start group audio 2016-01-21 20:52:57 +06:00
Nils Fenner
82dfe0f704
fix audio singleton implementation 2016-01-09 13:12:39 +01:00
Nils Fenner
79ddbf7d02
open the first available audio in/out device as default, if specifier is empty 2015-12-28 12:06:22 +01:00
Nils Fenner
552155bd1f
Merge PR #2719 from antis81:fix_audio_subscriptions
* fix dangling audio output device
* do not resubscribe sid in copy constructor
2015-12-23 23:29:20 +01:00
Nils Fenner
19201dda8a
Merge pull request #2713 from antis81:newav_audio_cleanup 2015-12-20 23:10:03 +01:00
Nils Fenner
e73fd27d8b
fix: don't subscribe to in/out device when initialization failed 2015-12-20 09:45:43 +01:00
Nils Fenner
0615c7c3c6
reimplement audio in/out subscription concept 2015-12-20 09:45:43 +01:00
Nils Fenner
d8607324ce
cleanup AudioPrivate
* rename mAudioMeter -> audioMeter
* move class declaration below other classes
2015-12-20 09:45:43 +01:00
Nils Fenner
ace3662757
further improved audio metering
Give qTox time to do more important things -> do not measure with 100%.
2015-12-20 09:45:43 +01:00
Nils Fenner
535bb212f5
make use of QThread::requestInterruption 2015-12-20 09:45:43 +01:00
Nils Fenner
c39138a65d
lock mutex also on start/stop audio loop playback 2015-12-20 09:45:43 +01:00
Nils Fenner
08c43d0b83
cleanup OpenAL compatibility code in audio class 2015-12-20 09:45:43 +01:00
Nils Fenner
a1b87194b8
fix #2504
We need to filter samples * channels; also cleaned up data types
2015-12-20 09:45:43 +01:00
Nils Fenner
44d1c6fe74
[WIP] implement threaded level meter for input level
Issues:
1. Using 100% processor.
2. Temporary silences an active call -> reactivate after widget hide.

Still greatly improves metering audio data, removing "read buffer" errors.
2015-12-20 09:45:43 +01:00
Nils Fenner
5805c8c2bf
improved code for non-blocking audio player
Instead relying on hardcoded "d->alMainSource", we bind to the given OpenAL source instead.
2015-12-20 09:45:43 +01:00
Nils Fenner
67fbee8868
use qstring for path when playing audio file 2015-12-20 09:45:43 +01:00
Nils Fenner
b44ef6c596
introduce a non-blocking AudioPlayer
Also moved private stuff to private class.
2015-12-20 09:45:43 +01:00
Nils Fenner
1fb9bce78c
move audio class to thread before starting 2015-12-20 09:45:22 +01:00
Nils Fenner
bb7d2a72b7
privatized audio interface 2015-12-20 09:45:22 +01:00
Nils Fenner
c23cb0043f
implement actual audio in/out subscription management 2015-12-20 09:42:14 +01:00
Nils Fenner
137eca86d6
use single mutex for audio resource locking 2015-12-20 09:42:04 +01:00
Nils Fenner
68e7aef916
privatized open/close audio devices 2015-12-20 09:42:04 +01:00
Nils Fenner
f6c09104e4
fix noise (clipping) while (re-)initializing in/out audio device 2015-12-20 09:40:57 +01:00