diff options
Diffstat (limited to 'PluginControlInterface')
-rw-r--r-- | PluginControlInterface/CMakeLists.txt | 4 | ||||
-rw-r--r-- | PluginControlInterface/include/ControlSender.h | 2 | ||||
-rw-r--r-- | PluginControlInterface/src/ControlSender.cpp | 11 |
3 files changed, 10 insertions, 7 deletions
diff --git a/PluginControlInterface/CMakeLists.txt b/PluginControlInterface/CMakeLists.txt index 21612c5..7bd3bb1 100644 --- a/PluginControlInterface/CMakeLists.txt +++ b/PluginControlInterface/CMakeLists.txt @@ -7,8 +7,8 @@ set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/ControlPlugin) set(INCLUDES_FOLDER "include") FILE(READ "${AUDIO_INCLUDES_FOLDER}/control/ControlSendInterface.h" VERSION_BUFFER LIMIT 6000) -STRING(REGEX MATCH "ControlSendVersion*.[^0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER}) -STRING(REGEX REPLACE "[^0-9]" "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING}) +STRING(REGEX MATCH "ControlSendVersion*.[^0-9]*[0-9].[0-9]*[0-9]" LIB_INTERFACE_VERSION_STRING ${VERSION_BUFFER}) +STRING(REGEX REPLACE "ControlSendVersion*." "" LIB_INTERFACE_VERSION ${LIB_INTERFACE_VERSION_STRING}) MESSAGE(STATUS "Building against control interface version ${LIB_INTERFACE_VERSION}") INCLUDE_DIRECTORIES( diff --git a/PluginControlInterface/include/ControlSender.h b/PluginControlInterface/include/ControlSender.h index ace61a6..0e98768 100644 --- a/PluginControlInterface/include/ControlSender.h +++ b/PluginControlInterface/include/ControlSender.h @@ -77,7 +77,7 @@ public: void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error); void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error); void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error); - am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats); + am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats); uint16_t getInterfaceVersion() const; private: diff --git a/PluginControlInterface/src/ControlSender.cpp b/PluginControlInterface/src/ControlSender.cpp index 9df8232..60ae417 100644 --- a/PluginControlInterface/src/ControlSender.cpp +++ b/PluginControlInterface/src/ControlSender.cpp @@ -57,6 +57,7 @@ am_Error_e ControlSenderPlugin::startupController(ControlReceiveInterface *contr assert(controlreceiveinterface); mControlReceiveInterface = controlreceiveinterface; //here is a good place to insert SystemProperties into the database... + //and might be a good place to insert the Source and Sink CLasses as well return E_NOT_USED; } @@ -134,7 +135,8 @@ am_Error_e ControlSenderPlugin::hookUserDisconnectionRequest(const am_mainConnec am_Error_e ControlSenderPlugin::hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty) { - if (sinkID==0) return E_NON_EXISTENT; + if (sinkID == 0) + return E_NON_EXISTENT; mainSinkSoundPropertySet set; set.sinkID = sinkID; @@ -172,7 +174,7 @@ am_Error_e ControlSenderPlugin::hookUserVolumeChange(const am_sinkID_t SinkID, c set.sinkID = SinkID; set.mainVolume = newVolume; am_Error_e error; - if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, newVolume, RAMP_DIRECT, 20)) != E_OK) + if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, newVolume, RAMP_GENIVI_DIRECT, 20)) != E_OK) { return error; } @@ -189,7 +191,7 @@ am_Error_e ControlSenderPlugin::hookUserVolumeStep(const am_sinkID_t SinkID, con am_Sink_s sink; mControlReceiveInterface->getSinkInfoDB(SinkID, sink); set.mainVolume = sink.volume + increment; - if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, set.mainVolume, RAMP_DIRECT, 20)) != E_OK) + if ((error = mControlReceiveInterface->setSinkVolume(set.handle, SinkID, set.mainVolume, RAMP_GENIVI_DIRECT, 20)) != E_OK) { return error; } @@ -438,10 +440,11 @@ void ControlSenderPlugin::cbAckSetSinkSoundProperties(const am_Handle_s handle, (void) handle; } -am_Error_e ControlSenderPlugin::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats) +am_Error_e ControlSenderPlugin::getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e> & listPrioConnectionFormats) { (void) sourceID; (void) sinkID; + (void) listRoute; //ok, this is cheap. In a real product you have your preferences, right? listPrioConnectionFormats = listPossibleConnectionFormats; return (E_OK); |