LCOV - code coverage report
Current view: top level - media/client/ipc/source - WebAudioPlayerIpc.cpp (source / functions) Coverage Total Hit
Test: coverage.info Lines: 90.5 % 273 247
Test Date: 2025-03-21 11:02:39 Functions: 100.0 % 19 19

            Line data    Source code
       1              : /*
       2              :  * If not stated otherwise in this file or this component's LICENSE file the
       3              :  * following copyright and licenses apply:
       4              :  *
       5              :  * Copyright 2023 Sky UK
       6              :  *
       7              :  * Licensed under the Apache License, Version 2.0 (the "License");
       8              :  * you may not use this file except in compliance with the License.
       9              :  * You may obtain a copy of the License at
      10              :  *
      11              :  * http://www.apache.org/licenses/LICENSE-2.0
      12              :  *
      13              :  * Unless required by applicable law or agreed to in writing, software
      14              :  * distributed under the License is distributed on an "AS IS" BASIS,
      15              :  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      16              :  * See the License for the specific language governing permissions and
      17              :  * limitations under the License.
      18              :  */
      19              : #include "WebAudioPlayerIpc.h"
      20              : #include "RialtoClientLogging.h"
      21              : #include "RialtoCommonIpc.h"
      22              : #include "webaudioplayermodule.pb.h"
      23              : #include <IWebAudioPlayer.h>
      24              : 
      25              : namespace firebolt::rialto::client
      26              : {
      27              : 
      28            1 : std::shared_ptr<IWebAudioPlayerIpcFactory> IWebAudioPlayerIpcFactory::getFactory()
      29              : {
      30            1 :     std::shared_ptr<IWebAudioPlayerIpcFactory> factory;
      31              : 
      32              :     try
      33              :     {
      34            1 :         factory = std::make_shared<WebAudioPlayerIpcFactory>();
      35              :     }
      36            0 :     catch (const std::exception &e)
      37              :     {
      38            0 :         RIALTO_CLIENT_LOG_ERROR("Failed to create the web audio player ipc factory, reason: %s", e.what());
      39              :     }
      40              : 
      41            1 :     return factory;
      42              : }
      43              : 
      44              : std::unique_ptr<IWebAudioPlayerIpc>
      45            1 : WebAudioPlayerIpcFactory::createWebAudioPlayerIpc(IWebAudioPlayerIpcClient *client, const std::string &audioMimeType,
      46              :                                                   const uint32_t priority, std::weak_ptr<const WebAudioConfig> config,
      47              :                                                   std::weak_ptr<IIpcClient> ipcClientParam)
      48              : {
      49            1 :     std::unique_ptr<IWebAudioPlayerIpc> webAudioPlayerIpc;
      50              :     try
      51              :     {
      52            1 :         std::shared_ptr<IIpcClient> ipcClient = ipcClientParam.lock();
      53              :         webAudioPlayerIpc =
      54            3 :             std::make_unique<WebAudioPlayerIpc>(client, audioMimeType, priority, config,
      55            2 :                                                 ipcClient ? *ipcClient : IIpcClientAccessor::instance().getIpcClient(),
      56            3 :                                                 firebolt::rialto::common::IEventThreadFactory::createFactory());
      57            1 :     }
      58            0 :     catch (const std::exception &e)
      59              :     {
      60            0 :         RIALTO_CLIENT_LOG_ERROR("Failed to create the web audio player ipc, reason: %s", e.what());
      61              :     }
      62              : 
      63            1 :     return webAudioPlayerIpc;
      64              : }
      65              : 
      66           47 : WebAudioPlayerIpc::WebAudioPlayerIpc(IWebAudioPlayerIpcClient *client, const std::string &audioMimeType,
      67              :                                      const uint32_t priority, std::weak_ptr<const WebAudioConfig> config,
      68              :                                      IIpcClient &ipcClient,
      69           47 :                                      const std::shared_ptr<common::IEventThreadFactory> &eventThreadFactory)
      70           47 :     : IpcModule(ipcClient), m_webAudioPlayerIpcClient(client),
      71           94 :       m_eventThread(eventThreadFactory->createEventThread("rialto-web-audio-player-events")), m_webAudioPlayerHandle(-1)
      72              : {
      73           47 :     if (!attachChannel())
      74              :     {
      75            3 :         throw std::runtime_error("Failed attach to the ipc channel");
      76              :     }
      77              : 
      78           44 :     if (!createWebAudioPlayer(audioMimeType, priority, config))
      79              :     {
      80            1 :         detachChannel();
      81            1 :         throw std::runtime_error("Could not create the web audio player");
      82              :     }
      83           59 : }
      84              : 
      85           86 : WebAudioPlayerIpc::~WebAudioPlayerIpc()
      86              : {
      87              :     // destroy web audio player session
      88           43 :     destroyWebAudioPlayer();
      89              : 
      90              :     // detach the Ipc channel
      91           43 :     detachChannel();
      92              : 
      93              :     // destroy the thread processing async notifications
      94           43 :     m_eventThread.reset();
      95           86 : }
      96              : 
      97           63 : bool WebAudioPlayerIpc::createRpcStubs(const std::shared_ptr<ipc::IChannel> &ipcChannel)
      98              : {
      99           63 :     m_webAudioPlayerStub = std::make_unique<::firebolt::rialto::WebAudioPlayerModule_Stub>(ipcChannel.get());
     100           63 :     if (!m_webAudioPlayerStub)
     101              :     {
     102            0 :         return false;
     103              :     }
     104           63 :     return true;
     105              : }
     106              : 
     107           63 : bool WebAudioPlayerIpc::subscribeToEvents(const std::shared_ptr<ipc::IChannel> &ipcChannel)
     108              : {
     109           63 :     if (!ipcChannel)
     110              :     {
     111            0 :         return false;
     112              :     }
     113              : 
     114          126 :     int eventTag = ipcChannel->subscribe<firebolt::rialto::WebAudioPlayerStateEvent>(
     115           63 :         [this](const std::shared_ptr<firebolt::rialto::WebAudioPlayerStateEvent> &event)
     116           65 :         { m_eventThread->add(&WebAudioPlayerIpc::onPlaybackStateUpdated, this, event); });
     117           63 :     if (eventTag < 0)
     118            1 :         return false;
     119           62 :     m_eventTags.push_back(eventTag);
     120              : 
     121           62 :     return true;
     122              : }
     123              : 
     124            2 : void WebAudioPlayerIpc::onPlaybackStateUpdated(const std::shared_ptr<firebolt::rialto::WebAudioPlayerStateEvent> &event)
     125              : {
     126            2 :     if (event->web_audio_player_handle() == m_webAudioPlayerHandle)
     127              :     {
     128            1 :         firebolt::rialto::WebAudioPlayerState playerState = firebolt::rialto::WebAudioPlayerState::UNKNOWN;
     129            1 :         switch (event->state())
     130              :         {
     131            0 :         case firebolt::rialto::WebAudioPlayerStateEvent_WebAudioPlayerState_UNKNOWN:
     132            0 :             playerState = firebolt::rialto::WebAudioPlayerState::UNKNOWN;
     133            0 :             break;
     134            0 :         case firebolt::rialto::WebAudioPlayerStateEvent_WebAudioPlayerState_IDLE:
     135            0 :             playerState = firebolt::rialto::WebAudioPlayerState::IDLE;
     136            0 :             break;
     137            1 :         case firebolt::rialto::WebAudioPlayerStateEvent_WebAudioPlayerState_PLAYING:
     138            1 :             playerState = firebolt::rialto::WebAudioPlayerState::PLAYING;
     139            1 :             break;
     140            0 :         case firebolt::rialto::WebAudioPlayerStateEvent_WebAudioPlayerState_PAUSED:
     141            0 :             playerState = firebolt::rialto::WebAudioPlayerState::PAUSED;
     142            0 :             break;
     143            0 :         case firebolt::rialto::WebAudioPlayerStateEvent_WebAudioPlayerState_END_OF_STREAM:
     144            0 :             playerState = firebolt::rialto::WebAudioPlayerState::END_OF_STREAM;
     145            0 :             break;
     146            0 :         case firebolt::rialto::WebAudioPlayerStateEvent_WebAudioPlayerState_FAILURE:
     147            0 :             playerState = firebolt::rialto::WebAudioPlayerState::FAILURE;
     148            0 :             break;
     149            0 :         default:
     150            0 :             RIALTO_CLIENT_LOG_WARN("Recieved unknown web audio player state");
     151            0 :             break;
     152              :         }
     153              : 
     154            1 :         m_webAudioPlayerIpcClient->notifyState(playerState);
     155              :     }
     156            2 : }
     157              : 
     158            4 : bool WebAudioPlayerIpc::play()
     159              : {
     160            4 :     if (!reattachChannelIfRequired())
     161              :     {
     162            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     163            1 :         return false;
     164              :     }
     165              : 
     166            3 :     firebolt::rialto::WebAudioPlayRequest request;
     167            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     168              : 
     169            3 :     firebolt::rialto::WebAudioPlayResponse response;
     170            3 :     auto ipcController = m_ipc.createRpcController();
     171            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     172            3 :     m_webAudioPlayerStub->play(ipcController.get(), &request, &response, blockingClosure.get());
     173              : 
     174              :     // wait for the call to complete
     175            3 :     blockingClosure->wait();
     176              : 
     177              :     // check the result
     178            3 :     if (ipcController->Failed())
     179              :     {
     180            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to play due to '%s'", ipcController->ErrorText().c_str());
     181            1 :         return false;
     182              :     }
     183              : 
     184            2 :     return true;
     185            3 : }
     186              : 
     187            4 : bool WebAudioPlayerIpc::pause()
     188              : {
     189            4 :     if (!reattachChannelIfRequired())
     190              :     {
     191            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     192            1 :         return false;
     193              :     }
     194              : 
     195            3 :     firebolt::rialto::WebAudioPauseRequest request;
     196            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     197              : 
     198            3 :     firebolt::rialto::WebAudioPauseResponse response;
     199            3 :     auto ipcController = m_ipc.createRpcController();
     200            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     201            3 :     m_webAudioPlayerStub->pause(ipcController.get(), &request, &response, blockingClosure.get());
     202              : 
     203              :     // wait for the call to complete
     204            3 :     blockingClosure->wait();
     205              : 
     206              :     // check the result
     207            3 :     if (ipcController->Failed())
     208              :     {
     209            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to pause due to '%s'", ipcController->ErrorText().c_str());
     210            1 :         return false;
     211              :     }
     212              : 
     213            2 :     return true;
     214            3 : }
     215              : 
     216            4 : bool WebAudioPlayerIpc::setEos()
     217              : {
     218            4 :     if (!reattachChannelIfRequired())
     219              :     {
     220            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     221            1 :         return false;
     222              :     }
     223              : 
     224            3 :     firebolt::rialto::WebAudioSetEosRequest request;
     225            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     226              : 
     227            3 :     firebolt::rialto::WebAudioSetEosResponse response;
     228            3 :     auto ipcController = m_ipc.createRpcController();
     229            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     230            3 :     m_webAudioPlayerStub->setEos(ipcController.get(), &request, &response, blockingClosure.get());
     231              : 
     232              :     // wait for the call to complete
     233            3 :     blockingClosure->wait();
     234              : 
     235              :     // check the result
     236            3 :     if (ipcController->Failed())
     237              :     {
     238            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to set eos due to '%s'", ipcController->ErrorText().c_str());
     239            1 :         return false;
     240              :     }
     241              : 
     242            2 :     return true;
     243            3 : }
     244              : 
     245            5 : bool WebAudioPlayerIpc::getBufferAvailable(uint32_t &availableFrames,
     246              :                                            const std::shared_ptr<WebAudioShmInfo> &webAudioShmInfo)
     247              : {
     248            5 :     if (!webAudioShmInfo)
     249              :     {
     250            1 :         RIALTO_CLIENT_LOG_ERROR("webAudioShmInfo parameter can't be null!");
     251            1 :         return false;
     252              :     }
     253              : 
     254            4 :     if (!reattachChannelIfRequired())
     255              :     {
     256            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     257            1 :         return false;
     258              :     }
     259              : 
     260            3 :     firebolt::rialto::WebAudioGetBufferAvailableRequest request;
     261            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     262              : 
     263            3 :     firebolt::rialto::WebAudioGetBufferAvailableResponse response;
     264            3 :     auto ipcController = m_ipc.createRpcController();
     265            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     266            3 :     m_webAudioPlayerStub->getBufferAvailable(ipcController.get(), &request, &response, blockingClosure.get());
     267              : 
     268              :     // wait for the call to complete
     269            3 :     blockingClosure->wait();
     270              : 
     271              :     // check the result
     272            3 :     if (ipcController->Failed())
     273              :     {
     274            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to get buffer available due to '%s'", ipcController->ErrorText().c_str());
     275            1 :         return false;
     276              :     }
     277              : 
     278            2 :     availableFrames = response.available_frames();
     279            2 :     webAudioShmInfo->offsetMain = response.shm_info().offset_main();
     280            2 :     webAudioShmInfo->lengthMain = response.shm_info().length_main();
     281            2 :     webAudioShmInfo->offsetWrap = response.shm_info().offset_wrap();
     282            2 :     webAudioShmInfo->lengthWrap = response.shm_info().length_wrap();
     283              : 
     284            2 :     return true;
     285            3 : }
     286              : 
     287            4 : bool WebAudioPlayerIpc::getBufferDelay(uint32_t &delayFrames)
     288              : {
     289            4 :     if (!reattachChannelIfRequired())
     290              :     {
     291            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     292            1 :         return false;
     293              :     }
     294              : 
     295            3 :     firebolt::rialto::WebAudioGetBufferDelayRequest request;
     296            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     297              : 
     298            3 :     firebolt::rialto::WebAudioGetBufferDelayResponse response;
     299            3 :     auto ipcController = m_ipc.createRpcController();
     300            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     301            3 :     m_webAudioPlayerStub->getBufferDelay(ipcController.get(), &request, &response, blockingClosure.get());
     302              : 
     303              :     // wait for the call to complete
     304            3 :     blockingClosure->wait();
     305              : 
     306              :     // check the result
     307            3 :     if (ipcController->Failed())
     308              :     {
     309            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to get buffer delay source due to '%s'", ipcController->ErrorText().c_str());
     310            1 :         return false;
     311              :     }
     312              : 
     313            2 :     delayFrames = response.delay_frames();
     314              : 
     315            2 :     return true;
     316            3 : }
     317              : 
     318            4 : bool WebAudioPlayerIpc::writeBuffer(const uint32_t numberOfFrames)
     319              : {
     320            4 :     if (!reattachChannelIfRequired())
     321              :     {
     322            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     323            1 :         return false;
     324              :     }
     325              : 
     326            3 :     firebolt::rialto::WebAudioWriteBufferRequest request;
     327              : 
     328            3 :     request.set_number_of_frames(numberOfFrames);
     329            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     330              : 
     331            3 :     firebolt::rialto::WebAudioWriteBufferResponse response;
     332            3 :     auto ipcController = m_ipc.createRpcController();
     333            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     334            3 :     m_webAudioPlayerStub->writeBuffer(ipcController.get(), &request, &response, blockingClosure.get());
     335              : 
     336              :     // wait for the call to complete
     337            3 :     blockingClosure->wait();
     338              : 
     339              :     // check the result
     340            3 :     if (ipcController->Failed())
     341              :     {
     342            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to write to the buffer due to '%s'", ipcController->ErrorText().c_str());
     343            1 :         return false;
     344              :     }
     345              : 
     346            2 :     return true;
     347            3 : }
     348              : 
     349            4 : bool WebAudioPlayerIpc::getDeviceInfo(uint32_t &preferredFrames, uint32_t &maximumFrames, bool &supportDeferredPlay)
     350              : {
     351            4 :     if (!reattachChannelIfRequired())
     352              :     {
     353            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     354            1 :         return false;
     355              :     }
     356              : 
     357            3 :     firebolt::rialto::WebAudioGetDeviceInfoRequest request;
     358            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     359              : 
     360            3 :     firebolt::rialto::WebAudioGetDeviceInfoResponse response;
     361            3 :     auto ipcController = m_ipc.createRpcController();
     362            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     363            3 :     m_webAudioPlayerStub->getDeviceInfo(ipcController.get(), &request, &response, blockingClosure.get());
     364              : 
     365              :     // wait for the call to complete
     366            3 :     blockingClosure->wait();
     367              : 
     368              :     // check the result
     369            3 :     if (ipcController->Failed())
     370              :     {
     371            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to get device info source due to '%s'", ipcController->ErrorText().c_str());
     372            1 :         return false;
     373              :     }
     374              : 
     375            2 :     preferredFrames = response.preferred_frames();
     376            2 :     maximumFrames = response.maximum_frames();
     377            2 :     supportDeferredPlay = response.support_deferred_play();
     378              : 
     379            2 :     return true;
     380            3 : }
     381              : 
     382            4 : bool WebAudioPlayerIpc::setVolume(double volume)
     383              : {
     384            4 :     if (!reattachChannelIfRequired())
     385              :     {
     386            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     387            1 :         return false;
     388              :     }
     389              : 
     390            3 :     firebolt::rialto::WebAudioSetVolumeRequest request;
     391            3 :     request.set_volume(volume);
     392            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     393              : 
     394            3 :     firebolt::rialto::WebAudioSetVolumeResponse response;
     395            3 :     auto ipcController = m_ipc.createRpcController();
     396            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     397            3 :     m_webAudioPlayerStub->setVolume(ipcController.get(), &request, &response, blockingClosure.get());
     398              : 
     399              :     // wait for the call to complete
     400            3 :     blockingClosure->wait();
     401              : 
     402              :     // check the result
     403            3 :     if (ipcController->Failed())
     404              :     {
     405            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to set volume due to '%s'", ipcController->ErrorText().c_str());
     406            1 :         return false;
     407              :     }
     408              : 
     409            2 :     return true;
     410            3 : }
     411              : 
     412            4 : bool WebAudioPlayerIpc::getVolume(double &volume)
     413              : {
     414            4 :     if (!reattachChannelIfRequired())
     415              :     {
     416            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     417            1 :         return false;
     418              :     }
     419              : 
     420            3 :     firebolt::rialto::WebAudioGetVolumeRequest request;
     421            3 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     422              : 
     423            3 :     firebolt::rialto::WebAudioGetVolumeResponse response;
     424            3 :     auto ipcController = m_ipc.createRpcController();
     425            3 :     auto blockingClosure = m_ipc.createBlockingClosure();
     426            3 :     m_webAudioPlayerStub->getVolume(ipcController.get(), &request, &response, blockingClosure.get());
     427              : 
     428              :     // wait for the call to complete
     429            3 :     blockingClosure->wait();
     430              : 
     431              :     // check the result
     432            3 :     if (ipcController->Failed())
     433              :     {
     434            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to get volume due to '%s'", ipcController->ErrorText().c_str());
     435            1 :         return false;
     436              :     }
     437              : 
     438            2 :     volume = response.volume();
     439            2 :     return true;
     440            3 : }
     441              : 
     442           44 : bool WebAudioPlayerIpc::createWebAudioPlayer(const std::string &audioMimeType, const uint32_t priority,
     443              :                                              std::weak_ptr<const WebAudioConfig> webAudioConfig)
     444              : {
     445           44 :     if (!reattachChannelIfRequired())
     446              :     {
     447            0 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     448            0 :         return false;
     449              :     }
     450              : 
     451           44 :     firebolt::rialto::CreateWebAudioPlayerRequest request;
     452              :     request.set_audio_mime_type(audioMimeType);
     453           44 :     request.set_priority(priority);
     454           44 :     std::shared_ptr<const WebAudioConfig> kConfig = webAudioConfig.lock();
     455           44 :     if (kConfig)
     456              :     {
     457           44 :         ::firebolt::rialto::CreateWebAudioPlayerRequest_WebAudioPcmConfig pcm_config;
     458           44 :         pcm_config.set_rate(kConfig->pcm.rate);
     459           44 :         pcm_config.set_channels(kConfig->pcm.channels);
     460           44 :         pcm_config.set_sample_size(kConfig->pcm.sampleSize);
     461           44 :         pcm_config.set_is_big_endian(kConfig->pcm.isBigEndian);
     462           44 :         pcm_config.set_is_signed(kConfig->pcm.isSigned);
     463           44 :         pcm_config.set_is_float(kConfig->pcm.isFloat);
     464           44 :         request.mutable_config()->mutable_pcm()->CopyFrom(pcm_config);
     465              :     }
     466              : 
     467           44 :     firebolt::rialto::CreateWebAudioPlayerResponse response;
     468           44 :     auto ipcController = m_ipc.createRpcController();
     469           44 :     auto blockingClosure = m_ipc.createBlockingClosure();
     470           44 :     m_webAudioPlayerStub->createWebAudioPlayer(ipcController.get(), &request, &response, blockingClosure.get());
     471              : 
     472              :     // wait for the call to complete
     473           44 :     blockingClosure->wait();
     474              : 
     475              :     // check the result
     476           44 :     if (ipcController->Failed())
     477              :     {
     478            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to create web audio player due to '%s'", ipcController->ErrorText().c_str());
     479            1 :         return false;
     480              :     }
     481              : 
     482           43 :     m_webAudioPlayerHandle = response.web_audio_player_handle();
     483              : 
     484           43 :     return true;
     485           44 : }
     486              : 
     487           43 : void WebAudioPlayerIpc::destroyWebAudioPlayer()
     488              : {
     489           43 :     if (!reattachChannelIfRequired())
     490              :     {
     491            1 :         RIALTO_CLIENT_LOG_ERROR("Reattachment of the ipc channel failed, ipc disconnected");
     492            1 :         return;
     493              :     }
     494              : 
     495           42 :     firebolt::rialto::DestroyWebAudioPlayerRequest request;
     496           42 :     request.set_web_audio_player_handle(m_webAudioPlayerHandle);
     497              : 
     498           42 :     firebolt::rialto::DestroyWebAudioPlayerResponse response;
     499           42 :     auto ipcController = m_ipc.createRpcController();
     500           42 :     auto blockingClosure = m_ipc.createBlockingClosure();
     501           42 :     m_webAudioPlayerStub->destroyWebAudioPlayer(ipcController.get(), &request, &response, blockingClosure.get());
     502              : 
     503              :     // wait for the call to complete
     504           42 :     blockingClosure->wait();
     505              : 
     506              :     // check the result
     507           42 :     if (ipcController->Failed())
     508              :     {
     509            1 :         RIALTO_CLIENT_LOG_ERROR("Failed to destroy web audio player due to '%s'", ipcController->ErrorText().c_str());
     510              :     }
     511           42 : }
     512              : 
     513              : }; // namespace firebolt::rialto::client
        

Generated by: LCOV version 2.0-1