mmserv/tms/tmsimpl/src/tmsgaineffectbodyimpl.cpp
changeset 14 80975da52420
parent 12 5a06f39ad45b
child 20 b67dd1fc57c5
equal deleted inserted replaced
12:5a06f39ad45b 14:80975da52420
   148         gpointer queuehandler)
   148         gpointer queuehandler)
   149     {
   149     {
   150     iProxy = aProxy;
   150     iProxy = aProxy;
   151     if (queuehandler)
   151     if (queuehandler)
   152         {
   152         {
   153         ((TMSQueueHandler*) queuehandler)->AddObserver(*this, TMS_EFFECT_GAIN);
   153         static_cast<TMSQueueHandler*>(queuehandler)->AddObserver(*this,
       
   154                 TMS_EFFECT_GAIN);
   154         }
   155         }
   155     }
   156     }
   156 
   157 
   157 void TMSGainEffectBodyImpl::QueueEvent(TInt aEventType, TInt aError,
   158 void TMSGainEffectBodyImpl::QueueEvent(TInt aEventType, TInt aError,
   158         void* /*user_data*/)
   159         void* /*user_data*/)
   159     {
   160     {
   160     TMSSignalEvent event;
   161     TMSSignalEvent event = {}; //all elements initialized to zeros
   161     event.type = TMS_EVENT_EFFECT_GAIN_CHANGED;
   162     event.type = TMS_EVENT_EFFECT_GAIN_CHANGED;
   162     event.reason = aError;
   163     event.reason = aError;
   163 
   164 
   164     switch (aEventType)
   165     if (iObserver && iParent && aEventType == TMS_EVENT_EFFECT_GAIN_CHANGED)
   165         {
   166         {
   166         case TMS_EVENT_EFFECT_GAIN_CHANGED:
   167         iObserver->EffectsEvent(*iParent, event);
   167             {
       
   168             if (iObserver && iParent)
       
   169                 {
       
   170                 iObserver->EffectsEvent(iParent, event);
       
   171                 }
       
   172             }
       
   173             break;
       
   174         default:
       
   175             break;
       
   176         }
   168         }
   177     }
   169     }
   178 
   170