diff --git a/ChangeLog b/ChangeLog index d6f7f4496a1a9550895e3cd5b555bdfed7ed2bed..17c8a63c84cd4a068affe5662bd2839312d32746 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Laurielle LEA (18 July 2005) version 0.4 +- Fix incoming call sound notification +- Fix transfer if no busy line + Laurielle LEA (15 July 2005) version 0.4 - Fix configuration init diff --git a/src/audio/audiolayer.cpp b/src/audio/audiolayer.cpp index 9fdf1278f49c8b3ac5da7fa246d7690603e4a06b..dbf1c5e7964f9b65c81f7d29a6e919d2d1f55dbc 100644 --- a/src/audio/audiolayer.cpp +++ b/src/audio/audiolayer.cpp @@ -150,6 +150,7 @@ AudioLayer::audioCallback (const void *inputBuffer, void *outputBuffer, // Consume the regular one as well (same amount of bytes) _mainSndRingBuffer.Discard(SAMPLES_SIZE(toGet)); + } else { // If nothing urgent, play the regular sound samples diff --git a/src/audio/audiortp.cpp b/src/audio/audiortp.cpp index a88d8e6b50a1c0d01159deec48920dad3ff69c50..6b78e0509b15b4521814b8e476f22186568fe089 100644 --- a/src/audio/audiortp.cpp +++ b/src/audio/audiortp.cpp @@ -289,7 +289,7 @@ AudioRtpRTX::receiveSessionForSpkr (int16* data_for_speakers, countTime += time->getSecond(); if (Manager::instance().getNumberOfCalls() > 0 and Manager::instance().getbRingtone()) { - countTime = countTime % 2000; + countTime = countTime % 4000; if (countTime < 100 and countTime > 0) { Manager::instance().notificationIncomingCall(); } diff --git a/src/gui/qt/qtGUImainwindow.cpp b/src/gui/qt/qtGUImainwindow.cpp index ef1e8e3627640bfefa1434d72fc3b84af8755fbd..9ddfd5ee55bb49b46c1720f04abdc568114100d0 100644 --- a/src/gui/qt/qtGUImainwindow.cpp +++ b/src/gui/qt/qtGUImainwindow.cpp @@ -1027,11 +1027,15 @@ int QtGUIMainWindow::qt_transferCall (short id) { int i; - const string to(_lcd->getTextBuffer().ascii());; - _debug("qt_transferCall: Transfer call %d to %s\n", id, to.data()); - i = transferCall(id, to); - getPhoneLine(id)->setStatus(QString(getCall(id)->getStatus())); - return i; + if (id != -1) { + const string to(_lcd->getTextBuffer().ascii());; + _debug("qt_transferCall: Transfer call %d to %s\n", id, to.data()); + i = transferCall(id, to); + getPhoneLine(id)->setStatus(QString(getCall(id)->getStatus())); + return i; + } else { + return 0; + } } void @@ -1177,6 +1181,7 @@ QtGUIMainWindow::hangupLine (void) int i; int line = getCurrentLine(); int id = phLines[line]->getCallId(); + setTransfer(false); _debug("id = %d et line = %d\n", id, line); if (Manager::instance().getbCongestion()) { @@ -1320,7 +1325,8 @@ QtGUIMainWindow::button_msg (void) { // This number is validated by ok-button or typing Enter void QtGUIMainWindow::button_transfer (void) { - if (getCurrentLine() != -1) { + int line_num = getCurrentLine(); + if (line_num != -1 and phLines[line_num]->isBusy()) { setTransfer(true); onHoldCall(line2id(getCurrentLine())); displayStatus(TRANSFER_STATUS); diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp index 085d345932ea618cc1d48f7671b578133340ae6c..99a2bbcc734379c468d6dc98bdc25520e1be8a3e 100644 --- a/src/managerimpl.cpp +++ b/src/managerimpl.cpp @@ -640,13 +640,13 @@ void ManagerImpl::notificationIncomingCall (void) { int16* buf_ctrl_vol; int16* buffer = new int16[SAMPLING_RATE]; - int size = SAMPLING_RATE/2; + int size = SAMPLES_SIZE(FRAME_PER_BUFFER);//SAMPLING_RATE/2; int k, spkrVolume; _tone->generateSin(440, 0, buffer); // Control volume - buf_ctrl_vol = new int16[size]; + buf_ctrl_vol = new int16[size*CHANNELS]; spkrVolume = getSpkrVolume(); for (int j = 0; j < size; j++) { k = j*2; @@ -654,15 +654,8 @@ ManagerImpl::notificationIncomingCall (void) { } getAudioDriver()->urgentRingBuffer().Put(buf_ctrl_vol, - size * CHANNELS); + SAMPLES_SIZE(FRAME_PER_BUFFER)); - _debug("---- Notification call\n"); -#if 0 - getAudioDriver()->startStream(); - getAudioDriver()->sleep(NOTIFICATION_LEN); - getAudioDriver()->stopStream(); -#endif - delete[] buf_ctrl_vol; delete[] buffer; }