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

Commit c23885eb authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Add versions of get/SetParameters without I/O handle

This is a step towards hiding I/O handles from application level,
as much as possible.

Change-Id: I30f4171d5dcf77f8e8eb332ce2e9245b30f5f2e1
parent bd72d220
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -79,8 +79,12 @@ public:
    // set/get audio hardware parameters. The function accepts a list of parameters
    // key value pairs in the form: key1=value1;key2=value2;...
    // Some keys are reserved for standard parameters (See AudioParameter class).
    // The versions with audio_io_handle_t are intended for internal media framework use only.
    static status_t setParameters(audio_io_handle_t ioHandle, const String8& keyValuePairs);
    static String8  getParameters(audio_io_handle_t ioHandle, const String8& keys);
    // The versions without audio_io_handle_t are intended for JNI.
    static status_t setParameters(const String8& keyValuePairs);
    static String8  getParameters(const String8& keys);

    static void setErrorCallback(audio_error_callback cb);

+10 −0
Original line number Diff line number Diff line
@@ -190,6 +190,16 @@ String8 AudioSystem::getParameters(audio_io_handle_t ioHandle, const String8& ke
    return result;
}

status_t AudioSystem::setParameters(const String8& keyValuePairs)
{
    return setParameters((audio_io_handle_t) 0, keyValuePairs);
}

String8 AudioSystem::getParameters(const String8& keys)
{
    return getParameters((audio_io_handle_t) 0, keys);
}

// convert volume steps to natural log scale

// change this value to change volume scaling