61 // TMSIPDownlink::NewL |
61 // TMSIPDownlink::NewL |
62 // Symbian two-phase constructor |
62 // Symbian two-phase constructor |
63 // ----------------------------------------------------------------------------- |
63 // ----------------------------------------------------------------------------- |
64 // |
64 // |
65 TMSIPDownlink* TMSIPDownlink::NewL(TMSIPDevSoundObserver& observer, |
65 TMSIPDownlink* TMSIPDownlink::NewL(TMSIPDevSoundObserver& observer, |
66 const guint32 codecID, const TMMFPrioritySettings priority, |
66 const guint32 codecID, const TMMFPrioritySettings priority) |
67 const gint retrytime) |
|
68 { |
67 { |
69 TMSIPDownlink* self = new (ELeave) TMSIPDownlink(observer); |
68 TMSIPDownlink* self = new (ELeave) TMSIPDownlink(observer); |
70 CleanupStack::PushL(self); |
69 CleanupStack::PushL(self); |
71 self->ConstructL(codecID, priority, retrytime); |
70 self->ConstructL(codecID, priority); |
72 CleanupStack::Pop(self); |
71 CleanupStack::Pop(self); |
73 return self; |
72 return self; |
74 } |
73 } |
75 |
74 |
76 // ----------------------------------------------------------------------------- |
75 // ----------------------------------------------------------------------------- |
77 // TMSIPDownlink::ConstructL |
76 // TMSIPDownlink::ConstructL |
78 // Part two of Symbian two phase construction |
77 // Part two of Symbian two phase construction |
79 // ----------------------------------------------------------------------------- |
78 // ----------------------------------------------------------------------------- |
80 // |
79 // |
81 void TMSIPDownlink::ConstructL(const guint32 codecID, |
80 void TMSIPDownlink::ConstructL(const guint32 codecID, |
82 const TMMFPrioritySettings priority, const gint /*retrytime*/) |
81 const TMMFPrioritySettings priority) |
83 { |
82 { |
84 TRACE_PRN_FN_ENT; |
83 TRACE_PRN_FN_ENT; |
85 iCodecID = codecID; |
84 iCodecID = codecID; |
86 iPriority = priority; |
85 iPriority = priority; |
87 |
86 |
101 // ----------------------------------------------------------------------------- |
100 // ----------------------------------------------------------------------------- |
102 // TMSIPDownlink::Start |
101 // TMSIPDownlink::Start |
103 // |
102 // |
104 // ----------------------------------------------------------------------------- |
103 // ----------------------------------------------------------------------------- |
105 // |
104 // |
106 void TMSIPDownlink::Start(const gint /*retrytime*/) |
105 void TMSIPDownlink::Start() |
107 { |
106 { |
108 TRACE_PRN_FN_ENT; |
107 TRACE_PRN_FN_ENT; |
109 gint err = TMS_RESULT_ILLEGAL_OPERATION; |
108 gint err = TMS_RESULT_ILLEGAL_OPERATION; |
110 |
109 |
111 if (iStatus == EReady && iDevSound) |
110 if (iStatus == EReady && iDevSound) |
112 { |
111 { |
113 TRAP(err, iDevSound->PlayInitL()); |
112 TRAP(err, iDevSound->PlayInitL()); |
114 TRACE_PRN_IF_ERR(err); |
113 TRACE_PRN_IF_ERR(err); |
115 iObserver.DownlinkStarted(err); |
114 if (err != TMS_RESULT_SUCCESS) |
|
115 { |
|
116 iStatus = EReady; |
|
117 iObserver.DownlinkStarted(err); |
|
118 } |
116 } |
119 } |
117 TRACE_PRN_FN_EXT; |
120 TRACE_PRN_FN_EXT; |
118 } |
121 } |
119 |
122 |
120 // ----------------------------------------------------------------------------- |
123 // ----------------------------------------------------------------------------- |
704 CAudioOutput::TAudioOutputPreference outputDev = |
707 CAudioOutput::TAudioOutputPreference outputDev = |
705 iAudioOutput->AudioOutput(); |
708 iAudioOutput->AudioOutput(); |
706 |
709 |
707 switch (outputDev) |
710 switch (outputDev) |
708 { |
711 { |
709 case CAudioOutput::EPublic: |
|
710 output = TMS_AUDIO_OUTPUT_PUBLIC; |
|
711 break; |
|
712 case CAudioOutput::ENoPreference: |
712 case CAudioOutput::ENoPreference: |
713 case CAudioOutput::EAll: |
713 case CAudioOutput::EAll: |
714 case CAudioOutput::ENoOutput: |
714 case CAudioOutput::ENoOutput: |
715 case CAudioOutput::EPrivate: |
715 case CAudioOutput::EPrivate: |
|
716 output = TMS_AUDIO_OUTPUT_PRIVATE; |
|
717 break; |
|
718 case CAudioOutput::EPublic: |
|
719 output = TMS_AUDIO_OUTPUT_PUBLIC; |
|
720 break; |
716 default: |
721 default: |
717 output = TMS_AUDIO_OUTPUT_PRIVATE; |
722 output = TMS_AUDIO_OUTPUT_PRIVATE; |
718 break; |
723 break; |
719 } |
724 } |
720 } |
725 } |