equal
deleted
inserted
replaced
61 , m_stereoMode(QRadioTuner::Auto) |
61 , m_stereoMode(QRadioTuner::Auto) |
62 , m_signal(0) |
62 , m_signal(0) |
63 , m_currentBand(QRadioTuner::FM) |
63 , m_currentBand(QRadioTuner::FM) |
64 , m_currentFreq(87500000) |
64 , m_currentFreq(87500000) |
65 , m_scanning(false) |
65 , m_scanning(false) |
66 , m_vol(100) |
66 , m_vol(50) |
67 { |
67 { |
68 initRadio(); |
68 initRadio(); |
69 } |
69 } |
70 |
70 |
71 S60RadioTunerControl::~S60RadioTunerControl() |
71 S60RadioTunerControl::~S60RadioTunerControl() |
107 } |
107 } |
108 |
108 |
109 m_tunerUtility->NotifyChange(*this); |
109 m_tunerUtility->NotifyChange(*this); |
110 m_tunerUtility->NotifyStereoChange(*this); |
110 m_tunerUtility->NotifyStereoChange(*this); |
111 m_tunerUtility->NotifySignalStrength(*this); |
111 m_tunerUtility->NotifySignalStrength(*this); |
112 setVolume(m_audioPlayerUtility->MaxVolume()/2); |
|
113 |
112 |
114 TFrequency freq(m_currentFreq); |
113 TFrequency freq(m_currentFreq); |
115 m_tunerUtility->Tune(freq); |
114 m_tunerUtility->Tune(freq); |
116 |
115 |
117 m_available = true; |
116 m_available = true; |
278 |
277 |
279 void S60RadioTunerControl::setVolume(int volume) |
278 void S60RadioTunerControl::setVolume(int volume) |
280 { |
279 { |
281 if (m_audioPlayerUtility) { |
280 if (m_audioPlayerUtility) { |
282 m_vol = volume; |
281 m_vol = volume; |
283 TInt error = m_audioPlayerUtility->SetVolume(m_vol); |
282 TInt error = m_audioPlayerUtility->SetVolume(volume/10); |
284 emit volumeChanged(m_vol); |
283 emit volumeChanged(m_vol); |
285 } |
284 } |
286 } |
285 } |
287 |
286 |
288 bool S60RadioTunerControl::isMuted() const |
287 bool S60RadioTunerControl::isMuted() const |
343 bool S60RadioTunerControl::isAvailable() const |
342 bool S60RadioTunerControl::isAvailable() const |
344 { |
343 { |
345 return m_available; |
344 return m_available; |
346 } |
345 } |
347 |
346 |
348 QtMediaServices::AvailabilityError S60RadioTunerControl::availabilityError() const |
347 QtMultimedia::AvailabilityError S60RadioTunerControl::availabilityError() const |
349 { |
348 { |
350 if (m_available) |
349 if (m_available) |
351 return QtMediaServices::NoError; |
350 return QtMultimedia::NoError; |
352 else |
351 else |
353 return QtMediaServices::ResourceError; |
352 return QtMultimedia::ResourceError; |
354 } |
353 } |
355 |
354 |
356 QRadioTuner::Error S60RadioTunerControl::error() const |
355 QRadioTuner::Error S60RadioTunerControl::error() const |
357 { |
356 { |
358 return m_radioError; |
357 return m_radioError; |