Commit 48d49ab0 authored by Alexandre Savard's avatar Alexandre Savard

[#2333] Exclusive test in playback loop

parent d93b45e7
......@@ -458,7 +458,8 @@ void PulseLayer::writeToSpeaker (void)
if (urgentAvailBytes > 0) {
_debug("urgentAvailBytes: %i\n", urgentAvailBytes);
toGet = (urgentAvailBytes < (int) (framesPerBuffer * sizeof (SFLDataFormat))) ? urgentAvailBytes : framesPerBuffer * sizeof (SFLDataFormat);
out = (SFLDataFormat*) pa_xmalloc (toGet * sizeof (SFLDataFormat));
_urgentRingBuffer.Get (out, toGet, 100);
......@@ -488,7 +489,7 @@ void PulseLayer::writeToSpeaker (void)
}
}
if (file_tone != 0) {
else if (file_tone != 0) {
if (playback->getStreamState() == PA_STREAM_READY)
{
......
......@@ -1689,6 +1689,9 @@ ManagerImpl::playDtmf (char code, bool isTalking)
// ms/s
size = (int) ((pulselen * (float) audiolayer->getSampleRate()) / 1000);
_debug("DTMF ---------------- size: %i\n", size);
_debug("DTMF ----------pulselength: %i\n", pulselen);
// this buffer is for mono
// TODO <-- this should be global and hide if same size
buf = new SFLDataFormat[size];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment