Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8274981a authored by linus_lee's avatar linus_lee
Browse files

Eleven: Add equalizer visualization

Change-Id: I9a3112cf4138e916ed53571236e54b67c30b53c4
parent a81b94d5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ LOCAL_SRC_FILES += $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
    android-support-v8-renderscript \
    android-common \
    android-visualizer \
    eleven_support_v4 \
    eleven_recyclerview

+4 −0
Original line number Diff line number Diff line
@@ -44,6 +44,10 @@
    <!-- Allows Apollo to read from External Storage -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

    <!-- Audio Visualizer Permissions -->
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

    <application
        android:name=".ElevenApplication"
        android:allowBackup="true"
+1.14 KiB
Loading image diff...
+17 −0
Original line number Diff line number Diff line
@@ -32,6 +32,23 @@
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        <include layout="@layout/loading_empty_container" />

        <View
            android:id="@+id/equalizerGradient"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/equalizer_background"
            android:layout_gravity="bottom"/>

        <com.cyngn.eleven.widgets.EqualizerView
            android:id="@+id/equalizerView"
            android:gravity="bottom"
            android:layout_gravity="bottom"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipChildren="false"
            android:clipToPadding="false"
            android:visibility="visible" />
    </com.cyngn.eleven.widgets.SquareFrame>

    <RelativeLayout
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2012-2014 The CyanogenMod Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
    <!-- Height of each filled in block in each eq bar -->
    <dimen name="eqalizer_path_effect_1">8dp</dimen>
    <!-- Height of each empty block in each eq bar -->
    <dimen name="eqalizer_path_effect_2">1dp</dimen>
    <!-- Width of each eq bar -->
    <dimen name="eqalizer_path_stroke_width">22dp</dimen>

    <!-- The amount of divisions to make for eq bars -->
    <integer name="equalizer_divisions">12</integer>

    <!-- fudge factors to tweak display for various configs
        ends up being dB = ((dB * fuzz_factor) + db_fuzz) -->
    <integer name="equalizer_db_fuzz_factor">15</integer>
    <integer name="equalizer_db_fuzz">0</integer>
</resources>
 No newline at end of file
Loading