Skip to content
Snippets Groups Projects
Commit 48d49ab0 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2333] Exclusive test in playback loop

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