AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Final media player 201211/30/2022 ![]() ![]() base) | db (gain) | energy | amplitude | loudness note: the 'quietest perceivable sound' example (standard) base has these absolute values: 'e' is 1 pico-watt per square-foot, 'a' is 20 micropascals, 'l' is the quietest-perceivable-loudness note: the 'one decibel' unit is set up to correspond roughly to a change in loudness just substantial enough to be noticeable ![]() one decibel provides a specific amount to multiply energy, amplitude, and loudness values, such that they remain aligned realistically) basic idea: you can think of one decibel (of gain), + or -, as *translating into* the given changes-in/multipliers-for energy, amplitude, or loudness 8) (note: page uses terms 'power/intensity' and 'pressure' differently power/intensity: for whole shell at distance, pressure: field-quantity?) Public static void SetVolume_MyPossibl圜orrectApproach(this MediaPlayer s, double volume, VolumeScaleType volumeType = VolumeScaleType.Loudness) S.SetVolume((float)volume_scalar, (float)volume_scalar) *public static void SetVolume_IncorrectSOApproach(this MediaPlayer s, double volume, VolumeScaleType volumeType = VolumeScaleType.Loudness)ĭouble volume_scalar = volumeType = VolumeScaleType.Amplitude ? volume : (1 - (Math.Log(maxVolume - volume_toScale) / Math.Log(maxVolume))) Loudness // what people treat everyday volume values as (as in "that sounded 2 times as loud") Energy, // what MediaPlayer possibly treats passed values asĪmplitude, // what MediaPlayer most likely treats passed values as (it's in C#, for Xamarin Android, but the functionality should be the same for Java) public enum VolumeScaleType Instead I'll just post the large code/comment block in my program concerning it. I've spent the last few hours looking into this issue enough that I don't feel like going into too much detail explaining the issue. the transformation curve) based on how many volume-steps you set. In other words, the existing answers change how they scale the input volume-percent (i.e. that of Tomasz or ssuukk):ġ) Set 100 as the "max volume"/number of steps, and submit the volume 50.Ģ) Set 1000 as the "max volume"/number of steps, and submit the volume 500. Perform the following test, using their code (e.g. The other answers here are not correct-or at least, they're not configured properly. ![]()
0 Comments
Read More
Leave a Reply. |