Commit Graph

19 Commits (c7ad555eae0226e9e8556430e48b89e74f45e8d1)

Author SHA1 Message Date
Blackhive 988c0db1f6 obs: Allow styling of volume meters
This will allow styling of the volume meters so that users are not stuck
with the default colors when they style a theme. Volume meters' colors can
be changed in stylesheet.qss using the following format as an example:

VolumeMeter {
qproperty-bkColor: #DDDDDD;
qproperty-magColor: #207D17;
qproperty-peakColor: #3EF12B;
qproperty-peakHoldColor: #000000;
}
2015-01-14 02:01:20 -05:00
fryshorts 89792865a1 obs: Fix signal in volume control
Suppress signals of the volume slider when setting a value. This stops
the volume control from setting the source volume when it receives the
volume changed event from the source.
2015-01-02 20:11:28 +01:00
fryshorts 0f8b2faed4 obs: Fix label in volume control
Use a dedicated method for setting the dB label in the volume control
and make sure to call it regardless if the volume was changed through
the slider or from somewhere else.
2015-01-02 19:31:09 +01:00
fryshorts 43552478fc obs: Remove update time from volume meter
Remove the update time check from the volume meter since it is no longer
nescessary. The update interval can now be set with the volmeter which has
the added benefit of not loosing data where previously updates had been
skipped.
2014-12-14 18:39:54 +01:00
fryshorts 014a333807 obs/libobs: Use new volume meter api
This replaces the old code for the audio meter that was using
calculations in two different places with the new audio meter api.
The source signal will now emit simple levels instead of dB values,
in order to avoid dB conversion and calculation in the source.
The GUI on the other hand now expects simple position values from
the volume meter api with no knowledge about dB calculus either.
That way all code that handles those conversions is in one place,
with the option to easily add new mappings that can be used
everywhere.
2014-12-04 21:58:35 +01:00
fryshorts 3fea6997a7 obs: Use new fader from libobs for volume control
This replaces the code for volume control with a newer version that
uses the new fader implementation in order to control the fader/slider
position and source volume.
The volume label will now indicate the gain in dB instead of percent,
mainly because it looks cool and is easy to do.
Due to libobs saving the multiplier option for the source instead of
the slider/fader positon, existing volume levels will (mostly) stay
the same with only the slider beeing at a different position.
This is of course within the resolution of the slider (100 steps).
2014-11-26 20:07:26 +01:00
jp9000 c9df41c1e2 (API Change) Remove pointers from all typedefs
Typedef pointers are unsafe.  If you do:
typedef struct bla *bla_t;
then you cannot use it as a constant, such as: const bla_t, because
that constant will be to the pointer itself rather than to the
underlying data.  I admit this was a fundamental mistake that must
be corrected.

All typedefs that were pointer types will now have their pointers
removed from the type itself, and the pointers will be used when they
are actually used as variables/parameters/returns instead.

This does not break ABI though, which is pretty nice.
2014-09-25 21:48:11 -07:00
jp9000 513eaa5f36 Basic UI: Reduce audio meter mute timing threshold
Some devices burst their audio (such as when querying audio from
directshow), and the 250 millisecond threshold that sets the audio meter
back to muted status would erroneously cause the meter to appear bounce
back between muted and unmuted.  Instead, a one second test should be
sufficient time to prevent that from happening.
2014-08-28 18:39:41 -07:00
jp9000 a3682fc8fb (API Change) Use 'get' convention in libobs (base)
Instead of having functions like obs_signal_handler() that can fail to
properly specify their actual intent in the name (does it signal a
handler, or does it return a signal handler?), always prefix functions
that are meant to get information with 'get' to make its functionality
more explicit.

Previous names:             New names:
-----------------------------------------------------------
obs_audio                   obs_get_audio
obs_video                   obs_get_video
obs_signalhandler           obs_get_signal_handler
obs_prochandler             obs_get_proc_handler
obs_source_signalhandler    obs_source_get_signal_handler
obs_source_prochandler      obs_source_get_proc_handler
obs_output_signalhandler    obs_output_get_signal_handler
obs_output_prochandler      obs_output_get_proc_handler
obs_service_signalhandler   obs_service_get_signal_handler
obs_service_prochandler     obs_service_get_proc_handler
2014-08-08 11:04:46 -07:00
jp9000 73baaa59e9 (API Change) Unsquish libobs (base) names
Previous names:             New names:
-----------------------------------------------------------
obs_view_setsource          obs_view_set_source
obs_view_getsource          obs_view_get_source
obs_source_getdisplayname   obs_source_get_display_name
obs_source_getwidth         obs_source_get_width
obs_source_getheight        obs_source_get_height
obs_filter_getparent        obs_filter_get_parent
obs_filter_gettarget        obs_filter_get_target
obs_source_filter_setorder  obs_source_filter_set_order
obs_source_getsettings      obs_source_get_settings
obs_source_getname          obs_source_get_name
obs_source_setname          obs_source_set_name
obs_source_setvolume        obs_source_set_volume
obs_source_getvolume        obs_source_get_volume
obs_scene_getsource         obs_scene_get_source
obs_scene_fromsource        obs_scene_from_source
obs_scene_findsource        obs_scene_find_source
obs_output_getdisplayname   obs_output_get_display_name
obs_output_getname          obs_output_get_name
obs_encoder_getname         obs_encoder_get_name
obs_service_getdisplayname  obs_service_get_display_name
obs_service_getname         obs_service_get_name
2014-08-08 11:04:46 -07:00
HomeWorld 6036857232 Workaround for audio meter widget getting stuck 2014-07-23 19:56:36 +03:00
HomeWorld 6b284d9e58 Fix audio meters so that volume is applied linearly. 2014-07-14 21:12:53 +03:00
HomeWorld 37828ce26d Implemented a simple volume meter widget 2014-07-14 19:32:39 +03:00
jp9000 5585ae0eff Rename volume control if audio source renamed 2014-07-08 11:58:48 -07:00
jp9000 ab1543977f UI: Add new volume meter handling
This adds support for the more smooth volume levels that accounts for
both level and magnitude.  Currently, it just averages level and
magnitude, later on a full audio meter control can be made that would
properly utilize level, magnitude, and peak.

Also cleaned up the code a bit and removed some trailing whitespace.
2014-06-03 04:51:27 -07:00
Danni 6d6bdfc038 Added simple volume meter. Updated per comments Pull Req #90
Missed a bit...
2014-05-24 20:18:28 -07:00
Danni 90d9a5204f Updated per comments pull #90. 2014-05-24 16:24:48 -07:00
Danni bc542a3e75 Added simple volume meter for reference of input levels. 2014-05-20 09:26:18 -05:00
jp9000 52746c2523 Add (temporary terrible) volume controls
- Add volume control

   These volume controls are basically nothing more than sliders.  They
   look terrible and hopefully will be as temporary as they are
   terrible.

 - Allow saving of specific non-user sources via obs_load_source and
   obs_save_source functions.

 - Save data of desktop/mic audio sources (sync data, volume data, etc),
   and load the data on startup.

 - Make it so that a scene is created by default if first time using the
   application.  On certain operating systems where supported, a default
   capture will be created.  Desktop capture on mac, particularly.  Not
   sure what to do about windows because monitor capture on windows 7 is
   completely terrible and is bad to start users off with.
2014-05-03 22:54:38 -07:00